[GRASS-user] r.mapcalc help on eliminating negative values

Luisa Peña luisapena1979 at gmail.com
Wed Oct 6 06:01:55 EDT 2010


Greetings

I'm having some unexpected difficulties on setting negative valeus to null
using r.mapcalc.

I have a raster named d_data (DCELL) with  the following range of values
 |   Range of data:    min = -0.001399  max = 0.356480
Only a few values are negative so I want to set them to null

I have used this expression
if(d_cell at National <0 , null(), d_cell at National)
and when i do r.info output I get:
|   Data Type:    DCELL
 |   Range of data:    min = nan  max = nan

Which is not expected

What am I doing wrong in this expression?

Thanks
Luisa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20101006/f2644c9e/attachment.html


More information about the grass-user mailing list