[GRASSLIST:5088] Rescaling
Michael Ash
mash at econs.umass.edu
Wed Nov 27 08:45:23 EST 2002
> > Now I have a new problem with my recently-created roughness map: When I
> > compare it with other similar map made with Arcview, I see that there's
> > a little difference in the scale of the roughness. In the arcview's map,
> > the scale goes from 1 (planar area) to 1.23, but in the GRASS's map, it
> > goes from 0 (planar area) to 67. I guess I have o normalise the values,
> > but I don't know how. Any ideas?
> If you want 67 to be 1.23, and 0 to be 1, try something like:
> r.mapcalc newmap='1+(oldmap*(0.23/67))'
Another approach is
r.rescale input=my_oldmap from=0,67 output=my_newmap to=1,1.23
(In fact, I would guess that r.rescale does not work with
decimal values. r.rescale appears intended to generate
integer color scales, e.g., 0 to 255; so the r.mapcalc
approach would be appropriate for this example, but you
might want to know about r.rescale for future use.)
Best,
Michael
More information about the grass-user
mailing list