On Tue, Mar 31, 2009 at 4:21 PM, fulvio <[email protected]> wrote:
>
> Hi everyone,
>
> I am requested to produce a new raster map from already available ones, with 
> the purpose of ranking each cell according to some criteria, e.g., beauty. 
> For instance, if a given cell contains vegetation, this should increase this 
> ranking.
>
> It seems appropriate to use r.mapcalc. However, what is unclear to me is how 
> to sum up all contributions from the various maps, discriminating between 
> categories within the single raster map.
>
> Could you provide me with an example of this?

I think that this is easiest solved with the eval() function of r.mapcalc.
See for example the r.shaded.relief script in the scripts/ directory for
usage of eval(). It permits to define tmp variables on the fly and compose
a series of conditions and calculations into one r.mapcalc instruction.

Hope this helps
Markus
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to