[GRASS-user] r.mapcalc problem ?

Juan Carlos Torres jctorres at ugr.es
Thu Jul 2 14:02:51 EDT 2009


Hi Martin

I think that your second command is correct. That is


r.mapcalc 'test = if(mydem < 0.0000,mydem,null())'

Probably your problem is that your are drawing the new map on top of the 
older one.
Just try to erase the monitor before drawing

d.mon start=x0
d.erase
d.rast test

Juan Carlos


Martin Laloux escribió:
> Excuse me if I seem stupid but I have a problem with r.mapcalc. I have 
> a dem stored in FCELL with range of data(z) : min = -26.670000  max = 
> 695.960022 . I try to extract a raster/dem with all values < 0.
> I try
> r.mapcalc 'test = if(mydem >0.0000,mydem,null())'
> Results give me
> Range of datafor test :    min = 0.200000  max = 695.960022 
> with r.mapcalc 'test = if(mydem < 0.0000,mydem,null())'
> results
> Range of data:    min = -26.670000  max = -0.010000  -> ok for me
> But when i  display test map, i allways get the full dem and not only 
> a map with values < 0.
> I try replacing test with MASK but same result
> What is the error I made or how can I do ?
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> grass-user mailing list
> grass-user en lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>   



More information about the grass-user mailing list