Re: [GRASS-user] r.forestfrag AddOn

2012-03-02 Thread maning sambale
Dear Stefan, If i remember it right, the window size is an input to the r.neighbors command. In the script there is an option to slect a windows size: #%option #% key: window #% type: integer #% description: window size default is 5 #% answer : 5 #% required : yes #%END You can modify the

[GRASS-user] Replace 0 by NULL in categorial raster map

2012-03-02 Thread Johannes Radinger
Hi, I'd like to replace all values/categories 0 by real NULL values. Furthermore I want to do that in a Python script. I tried to do it with mapcalc in the script but then I loose the category labels: grass.mapcalc($out= if($in==0,null(),$in), out = in,

Re: [GRASS-user] Replace 0 by NULL in categorial raster map

2012-03-02 Thread Moritz Lennert
On 02/03/12 15:09, Johannes Radinger wrote: Hi, I'd like to replace all values/categories 0 by real NULL values. Furthermore I want to do that in a Python script. I tried to do it with mapcalc in the script but then I loose the category labels: grass.mapcalc($out= if($in==0,null(),$in),

Re: [GRASS-user] Replace 0 by NULL in categorial raster map

2012-03-02 Thread Johannes Radinger
On 02/03/12 15:09, Johannes Radinger wrote: Hi, I'd like to replace all values/categories 0 by real NULL values. Furthermore I want to do that in a Python script. I tried to do it with mapcalc in the script but then I loose the category labels: grass.mapcalc($out=

Re: [GRASS-user] Get non-NULL cells over multiple rasters

2012-03-02 Thread Glynn Clements
Moritz Lennert wrote: Any reason why the solution using splitlines() is not acceptable: maps=grass.read_command('g.mlist', pattern='rast_*|crast_*|Treene_raster', type='rast').splitlines() No, but it shouldn't be necessary; such fundamental operations should have dedicated library

Re: [GRASS-user] Replace 0 by NULL in categorial raster map

2012-03-02 Thread Moritz Lennert
On 02/03/12 15:56, Johannes Radinger wrote: Just for my personal interest two questions: 1) What if I want to replace the category 0 with NULL (not the values 0) Category 0 = value 0. Raster values in GRASS are called categorie values. Or maybe I don't understand what you mean ? 2) What

[GRASS-user] How one can find the starting and end point of a line in a vector file or how one can connect two line end to end using C code

2012-03-02 Thread SWAPAN GHOSH
Hello, Any one can solve me the problem like- How one can find the starting and end point of a line in a vector file or how one can connect two line end to end using C code. If there is any change needed in code like C or Python Script please suggest me. How I can do it. Regards, Swapan