[GRASSLIST:5231] Re: r.volume

Gordon Keith gordon.keith at csiro.au
Sun Dec 15 19:58:52 EST 2002

On Sun, 15 Dec 2002 21:24, Malte Martin wrote:

> Does r.volume only calculate integer values? I got 44 cells
> (resolution: 1 m) with a data range of 0.1 - 0.36 m. But when
> calcultating the volume r.volume returns 0.00 cubicmeters.
> I thought about summarizing all cell values and multiplying it with
> the 44 cells. Can anybody give me a hint how I can get the sum of all
> cell-values (as I understood r.statistics only works with integer
> data). Some neighbor operations with r.mapcalc?

A common workaround is to multiply your original data set by 10^number 
of digits precision you want then divide the answer by the same.

mapcalc "workmap = map * 1000000"


Gordon Keith
Programmer/Data Analyst
Marine Acoustics
CSIRO Marine Research

"Computers are useless. They can only give you answers." 
- Pablo Picasso, 1968

More information about the grass-user mailing list