[GRASSLIST:1841] Re: r.reclass

Eric G. Miller egm2 at jps.net
Mon May 14 21:30:11 EDT 2001


On Mon, May 14, 2001 at 09:22:04PM +0200, Dieter Lehmann wrote:
> Hi,
> 
> is that true, that r.reclass is not able to work with floats?
> 
> sample:
> -------------snip------------------
> r.mapcalc test='(float(tmp_b))'   #to be sure, that input is float
> 
> r.reclass input=test output=tmp_out <<EOF 
> 1=1
> 2=4
> 3=0.50
> 4=0.25
> 5=0.10
> EOF

It does seem that r.reclass doesn't like floats in it's rules (though it
will reclass floats).  Rules for floats almost always be ranges to cover
the inexact nature of floating point numbers.  I think there may already
be a bug report about this...

Example:

0 thru 2 = 1 Low
2 thru 4 = 2 Medium
4 thru 10 = 3 High

-- 
Eric G. Miller <egm2 at jps.net>




More information about the grass-user mailing list