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@National <0 , null(), d_cell@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
Luisa Peña wrote:
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@National <0 , null(), d_cell@National)
the raster is named d_data, not d_cell, so why not e.g.
r.mapcalc "d_cell = if(d_data@National < 0 , null(), d_data@National)"
?
Also, g.region -p rast=d_data could do wonders before running r.mapcalc
Markus M
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
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user