On 06/10/14 16:14, Pietro wrote:
On Mon, Oct 6, 2014 at 3:17 PM, Moritz Lennert
<[email protected]> wrote:
On 06/10/14 14:54, Pietro wrote:

Trying to circumvent the r.mapcalc min/max limit,


Just out of curiosity: why don't you just use r.recode or r.rescale ?

r.rescale was my first option, but it just reclassify in two
categories 1 and 255.

r.rescale assumes that input is integer, so if you feed it values between 0 and 1 then yes, but using the NC data as example and feeding it the elevation data directly:

r.rescale elevation out=elevation_0_255 to=0,255

gives the expected result.


I didn't thought about r.recode...but I think that easier combining r.info.

Why would you need r.info for that ?

Dividing by the max and then rescaling should give the same result as rescaling from the original values... All you are doing is dividing all values by a constant before rescaling.

Moritz
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to