[GRASSLIST:800] Re: r.statistics

Glynn Clements glynn.clements at virgin.net
Wed Jul 23 19:11:43 EDT 2003


Ulrich Leopold wrote:

> when I use r.statistiucs in GRASS-5.0.2 I get the following error
> message:
> 
> "ERROR: This module currently only works for integer (CELL) maps"
> 
> I am using a category map as base map and a floating point map as cover.
> This error does not appear when I use r.average with the same raster
> maps.
> 
> Is there a bug in r.statistics?

It's a limitation.

> Or do I still have to assign category values to one of the maps?

The simplest solution is to quantise the cover map with r.mapcalc,
e.g.

	r.mapcalc 'foo.quant = int(foo * 1000)'

Choose a scale factor which is large enough to give a reasonable
resolution. However, larger scale factors will result in increased
memory usage and slower execution, particularly for larger maps.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list