[GRASS-user] Extrac values with r.mapcalc

Lluís Vicens lluis at sigte.udg.es
Thu Apr 14 06:45:12 EDT 2011


Hi Gaspar, 

r.mapcalc "new.map = if(flat_map==0.0234,flat_map,null())" -> if you
want to preserve original values

or 

r.mapcalc "new.map = if(flat_map==0.0234,1,null())" -> if you prefer to
assign a value of 1 to those values equal to 0.0234 in the original
raster map

It should work.
Lluís


El dc 13 de 04 de 2011 a les 18:21 -0500, en/na Gaspar Reyes Póndigo va
escriure:

> Thanks Markus.
> 
> I did test with r.mapcalc novo_raster = if"(mi flat_map==0.0234)", but
> the map is not appropiate. I know the area of value (0.0234), but is
> not is equal in the novo_raster.
> 
> 
> El 13/04/2011, a las 17:27, Markus Neteler escribió:
> 
> 
> > 2011/4/13 Gaspar Reyes Póndigo <gos47 at hotmail.com>:
> > 
> > > Hello, Dear grass_user. My first forum participation in the
> > > grass_user list
> > > email.
> > 
> > 
> > Welcome!
> > 
> > 
> > > How to extract values of map raster with r.mapcalc? I need make
> > > new map
> > > raster based on specific value  of other raster.
> > 
> > 
> > Please take a look at the if() conditions:
> > 
> > http://grass.osgeo.org/grass64/manuals/html64_user/r.mapcalc.html
> > 
> > Therein is also a section EXAMPLES.
> > 
> > Markus
> > 
> 
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20110414/aa7a2733/attachment.html


More information about the grass-user mailing list