r.volume generates a table containing the sum of all cells from a data_map layer sorted by category on a clump map, and optionally generates a vector points map of the centroids for each clump. If a clump map is not specified, the current MASK is used. The sum is multiplied by the area of a cell to give the volume occupied by that cell. See below for an example of the output table.
If a clump map is not given and a MASK not set, the program exits with an error message.
r.volume works in the current region and respects the current MASK.
r.volume data=elevation clump=fields.only centroids=field.centers
Volume report on data from elevation using clumps on fields.only map Cat Average Data # Cells Centroid Total Number in clump Total in clump Easting Northing Volume 1 1181.09 75590 64 595500.00 4927700.00 755900000.00 2 1163.50 69810 60 597100.00 4927700.00 698100000.00 3 1146.83 34405 30 598300.00 4927700.00 344050000.00 4 1193.20 366311 307 599400.00 4927300.00 3663110000.00 ..... ..... ..... 60 1260.08 351563 279 603100.00 4921000.00 3515630000.00 61 1213.93 35204 29 603700.00 4921500.00 352040000.00 62 1207.71 33816 28 604100.00 4921500.00 338160000.00 Total Volume = 67226740000.00The Data Total column is the sum of the elevations for each in each of the fields. The Total Volume is the sum multiplied by the e-w resolution times the n-s resolution. Note that the units on the volume may be difficult if the units of cell values on the data_map layer and the resolution units differ.
This can be converted directly to a raster map with each point a separate category using v.to.rast.