[GRASSLIST:1840] r.reclass

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

ERROR: 3=0.50
- invalid reclass rule
------------------snip---------

I'm working with grass5beta11 (or even with CVS from Friday)

Regards,
Dieter

----------------------------------
Dieter Lehmann
University of applied Sciences
Schelmenwasen 4-8
D-72622 Nuertingen, Germany
lehmann@fh-nuertingen.de
Phone: +49 (0) 7022 404 Ext. 207
Fax: +49 (0) 7022 404 Ext. 209

Date: Sun, 14-May-01 12:00:00 +0000 (GMT)
Time: 21:14:27

----------------------------------

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@jps.net>