[GRASS-user] r.reclass probs with negative values

Hamish hamish_nospam at yahoo.com
Tue Nov 14 17:45:18 EST 2006


Malte Halbey-Martin wrote:
> > certainly something total easy, but is there a way to reclassify 
> > negative values with r.reclass?
> > 
> > fp: Data range is -0.2180119007825851440429688 to 
> > 0.1608885973691940307617188
> >  > -0.2180119007825851440429688 thru 0.001 = 1 label
> > -0.718012 rounded up to 0
> > 0.501000 rounded up to 0
> > 
> > Does r.reclass only work with integer or positive values? I couldn't
> > find anything about that in the manual.

Glynn:
> Only integer maps can be reclassed.


for FP reclassification use r.mapcalc:

r.mapcalc "newmap= if( oldmap < 0.001, 1, 2 )"

if( test, then this, otherwise this )


Hamish




More information about the grass-user mailing list