[GRASS-user] r.mapcalc and mode values / labeling raster values
Glynn Clements
glynn at gclements.plus.com
Tue Nov 11 08:53:03 EST 2008
Christian Schwartze wrote:
> 1) I have a complex r.mapcalc construct containing a mode value calculation. So
> what happens when there is more than one exclusive mode value in the expression
> mode(a_1,...,a_n)? Random select?
The highest value is returned.
> How to avoid it?
If you want the lowest value, you can negate the arguments and the
result, i.e.:
-mode(-a_1,..,-a_n)
If you want something else, you'll need to extend r.mapcalc.
> 2) I always use the sequence r.stats [...] | awk [...] | r.reclass [...] to
> reassign raster labels according to my wishes. Now I wonder if the
> three-step-solution is the only one. For large raster maps the r.reclass part
> takes very long. How to handle that?
The size of the map shouldn't have any effect upon r.reclass, only the
number of categories. The size will affect r.stats, though.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list