[GRASS5] [bug #1219] (grass) r.support/range bug

Request Tracker grass-bugs at intevation.de
Fri Aug 2 03:58:25 EDT 2002


this bug's URL: http://intevation.de/rt/webrt?serial_num=1219
-------------------------------------------------------------------------

Subject: r.support/range bug

grass obtained from: CVS
grass binary for platform: Compiled from Sources

Hi,

a bug report... r.support seems not to calculate the range properly (minimum always set to 0).

Some test:

g.region -pa res=100
projection: 99 (Transverse Mercator)
zone:       0
datum:      rome40
ellipsoid:  international
north:      5136900
south:      5131800
west:       1649000
east:       1655400
nsres:      100
ewres:      100
rows:       51
cols:       64

r.mapcalc test="10+row()"
test = (add(10,row()))
 100%

r.info test
Data Type:    CELL
Range of data:    min =  11 max = 61

So far so nice. But:

r.support -r test
  Updating the stats for [test]

r.info test
Data Type:    CELL
Range of data:    min =  0 max = 61

Oops. The range update is wrong inside
src/raster/r.support/cmd/check.c
-----------------------------------------

Next test with FP

r.mapcalc testfp="10.1+row()"
test = (add(10.100000,double(row())))
 100%

r.info testfp
Data Type:    DCELL
Range of data:    min =  11.100000 max = 61.100000

r.support -r testfp
  Updating the stats for [testfp]
   Updating the number of categories for [testfp]

r.info testfp
Data Type:    DCELL
Range of data:    min =  0.000000 max = 61.000000

It seems that r.mapcalc knows how to calculate the range properly, while r.support doesn't.

Markus


-------------------------------------------- Managed by Request Tracker



More information about the grass-dev mailing list