[GRASS-user] Replace 0 by NULL in categorial raster map
Moritz Lennert
mlennert at club.worldonline.be
Fri Mar 2 14:22:30 EST 2012
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 would be the correct module if I want to assign another
> category than NULL to certain values? Is hat module r.category? And
> how can that be used in pyhton (how are the rules supplied)? Eg.
> assign all values greater than 0 to 1 all other values NULL.
If you have a integer values (CELL), then r.reclass.
If you have floating point values, generally r.recode is more
appropriate (or just multiply your floating point map by the appropriate
number to make it integer).
Moritz
More information about the grass-user
mailing list