[GRASS-user] settings nulls with r.mapcalc
Glynn Clements
glynn at gclements.plus.com
Tue Oct 28 13:54:38 EDT 2008
Sebastian P. Luque wrote:
> Are the following calls doing the same in terms of which cells get
> assigned the null value?
>
> $ r.mapcalc "new_raster = if(raster == 0 || raster == 253, null(), raster)"
> $ r.null map=raster setnull=0,253
Yes; both set any cells which are either 0 or 253 to null.
They differ in that r.mapcalc creates a new map while r.null modifies
the existing map in-place.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list