[GRASS-user] r.mapcalc concatenates values?

Christian Schwartze Christian.Schwartze at uni-jena.de
Wed Sep 10 05:58:59 EDT 2008


Hi Gabriele,

using r.mapcalc and the @-operator within the calculation you have access to the
labels, but in IF statements it works only on labels that starts with a number
(int vals). So looking for a string is not possible.
But why not using the cats or int labels(with @) in mapcalc, then asigning a new
and unique cat value, following a reclass new_cat_by_mapcalc --> string label?

r.mapcalc 'mapA=if((@landuse==1&&@soils==2),12,null())

r.reclass with something like "12 = 1 forest,loam"

Dont know if my notes helpful...

Regards,
Christian.


----------------------------------------------------------------
This mail was sent through http://webmail.uni-jena.de


More information about the grass-user mailing list