[GRASS-user] How to use r.mapcalc from command-line

Markus Neteler neteler at osgeo.org
Mon Oct 3 10:22:12 EDT 2011


On Fri, Sep 30, 2011 at 2:59 PM, katrin eggert
<katrineggert1980 at gmail.com> wrote:
> Greetings I would like to run an expression r.mapcalc (with ifs, Sums and /)
> from command-line. How can i do that?

For example like this (nonsense example):

r.mapcalc "output = if(slopemap >= 0.0 && slopemap < 10.0, somemap /
5.0, null())"

You may look into these GRASS scripts which contain more examples:

d.rast.edit i.fusion.brovey i.image.mosaic i.in.spotvgt i.tasscap
r3.mapcalculator
r3.mapcalculator r.blend r.colors.stddev r.fillnulls r.in.wms r.mapcalculator
r.mapcalculator r.mask r.reclass.area r.shaded.relief v.colors

Markus


More information about the grass-user mailing list