[GRASS-user] problem with r.reclass rounding up values

Moritz Lennert mlennert at club.worldonline.be
Wed Apr 29 13:14:57 EDT 2009


On 29/04/09 18:44, A. Márcia BARBOSA wrote:
> Hi everyone,
> 
> I'm trying to reclass a floating point raster (continuous values from
> 0 to 1) using a txt file with the following rules:
> 
> 0 thru 0.2 = 1
> 0.2 thru 0.8 = 2
> 0.8 thru 1 = 3
> 
> But the GRASS shell replies
> 
> 0.700000 rounded up to 0
> 0.700000 rounded up to 0
> 1.300000 rounded up to 1
> 1.300000 rounded up to 1
> 
> And the output raster has only two values, 2 and 3 (and the input has
> areas below 0.2 that should have been reclassified to 1). What am I
> doing wrong?

r.reclass only allows integer values (This should be mentioned in the 
man page somewhere. If it isn't that's a bug IMHO), try r.recode.

Moritz


More information about the grass-user mailing list