[GRASS-user] r.rescale categories definition

John Tate john.tate at ntlworld.com
Sat Dec 12 06:20:17 EST 2009


On Saturday 12 December 2009 11:03:35 Aldo Clerici wrote:
> Dear GRASS Users and Developers,
> 
> I'm having some problem in understanding the categories resulting from
> r.rescale
> 
> 
> 
> With:
> 
> r.rescale in=elevation.dem from=1200,1500 to=1,2 out=elev.resc
> 
> 
> 
> I have this result:
> 
> 1   1200 thru 1349
> 
> 2   1350 thru 1500
> 
> 
> 
> Two categories with a range of 150 meters each.
> 
> 
> 
> But with a new three categories subdivision:
> 
>  r.rescale in=elevation.dem from=1200,1500 to=1,3 out=elev.resc
> 
> the result is:
> 
> 1    1200 thru 1274
> 
> 2    1275 thru 1424
> 
> 3    1425 thru 1500
> 
> 
> 
> The first and last categories have a range of 75 meters and the second one
> of 150 meters.
> 
> 
> 
> Similar result with a four categories subdivision:
> 
> r.rescale in=elevation.dem from=1200,1500 to=1,4 out=elev.resc
> 
> 
> 
> 1    1200 thru 1250
> 
> 2    1251 thru 1350
> 
> 3    1351 thru 1450
> 
> 4    1451 thru 1500
> 
> 
> 
> Categories 1 and 4 have a range of 50 meters, 2 and 3 a range of 100
>  meters.
> 
> 
> 
> It seems that the first and last categories have the half range of all the
> others ones. Is this correct? Shouldn't the range be the same for all
> categories?
> 
> (same results with GRASS6.4, GRASS6.3 and GRASS6.2).
> 
> Many thanks in advance
> 
> 
> 
> A. Clerici
> 
> Parma University
> 
> Italy
> 

Hi, I have not used r.rescale (perhaps it uses some form of ratio on the 
amount of points in given categories it assigns, hence the middle categories 
being larger ranges). I think r.reclass would be a better option so you can 
classify exactly what the categories would be.

John


More information about the grass-user mailing list