[GRASS-dev] possible bug on r.mapcalc round() G7
Moritz Lennert
mlennert at club.worldonline.be
Mon Mar 18 03:21:06 PDT 2013
On 15/03/13 20:38, Margherita Di Leo wrote:
> Hi all,
>
> trying to rescale a map to 0:255 range, I run:
>
> r.univar -g map
> n=9599576
> null_cells=0
> cells=9599576
> min=-1.55537462234497
> max=274.231811523438
> range=275.787186145782
> mean=96.915776629461
> mean_of_abs=96.915791505254
> stddev=37.6540983935747
> variance=1417.831125833
> coeff_var=38.8523929778099
> sum=930350363.3535346985
>
> taking the max, i run:
>
> r.mapcalc "map.invscaled = round((1.0 - map / 274.231811523438) * 255.0)"
Just out of curiosity: why use r.mapcalc and not r.recode ? Is there any
advantage of the former over the latter ?
Moritz
More information about the grass-dev
mailing list