[GRASS-dev] strange mapcalc result

Glynn Clements glynn at gclements.plus.com
Mon Jul 11 23:54:27 EDT 2011

Michael Barton wrote:

> This is from GRASS 7 compiled from svn trunk yesterday.
> I'm simply trying to assign null values in an SRTM using r.mapcalc. I do the following statement...
> r.mapcalc expression='SRTM_ffB03_p199r033=if(SRTM_ffB03_p199r033==-32768,null(),SRTM_ffB03_p199r033)' --o
> The entire map turns to null.
> Any idea what I'm doing wrong?

Using the same map for input and output results in undefined
behaviour. If you want to change a value to null "in place", use

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list