r.volume.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <h2>DESCRIPTION</h2>
  2. <em>r.volume</em> is a tool for summing cell values within clumps and
  3. calculating volumes and centroids of patches or clumps.
  4. <p>
  5. <em>r.volume</em> generates a table containing the sum of all cells
  6. from a <b>input</b> raster map sorted by category on a <b>clump</b>
  7. raster map, and optionally generates a vector points map of the
  8. centroids for each clump. If a clump map is not specified, the
  9. current MASK is used. The MASK can be defined
  10. by <em><a href="r.mask.html">r.mask</a></em>. The sum is multiplied by
  11. the area of a cell to give the volume occupied by that cell. See below
  12. for an example of the output table.
  13. <!-- The table is placed in the user's home directory in the file
  14. Gvol.report. (or not???)
  15. NOTE: I can't find any evidence of this in the source code, and I have
  16. tested the module out as of Jan 10, 2008. I'll leave the above comment
  17. about automatic report generation commented out from the manpage for
  18. now, unless I get notification otherwise. - EP -->
  19. <h2>NOTES</h2>
  20. <p>
  21. If a clump map is not given and a MASK not set, the program exits with
  22. an error message.
  23. <p>
  24. <em>r.volume</em> works in the current region and respects the current
  25. MASK.
  26. <h3>CENTROIDS</h3>
  27. The centroid coordinates are the same as those stored in the vector
  28. map (if one was requested by <b>centroids</b> parameter). They are
  29. guaranteed to fall on a cell of the appropriate category, thus they
  30. are not always the true, mathematical centroid. They will always fall
  31. at a cell center.
  32. <p>
  33. Attribute table linked to the vector map with centroids contains several columns:
  34. <ul>
  35. <li><tt>cat</tt> - category value (integer)</li>
  36. <li><tt>volume</tt> - volume value (double precision)</li>
  37. <li><tt>average</tt> - average value in the clump (double precision)</li>
  38. <li><tt>sum</tt> - sum of cell values in the clump (double precision)</li>
  39. <li><tt>count</tt> - number of cells with the category (integer)</li>
  40. </ul>
  41. <p>
  42. Vector points can be converted directly to a raster map with each
  43. point a separate category
  44. using <em><a href="v.to.rast.html">v.to.rast</a></em>.
  45. <h3>APPLICATIONS</h3>
  46. By preprocessing the elevation raster map
  47. with <em><a href="r.mapcalc.html">r.mapcalc</a></em> and using
  48. suitable masking or clump maps, very interesting applications can be
  49. done with <em>r.volume</em>. Such as, calculating the volume of rock
  50. in a potential quarry; calculating cut/fill volumes for roads; finding
  51. water volumes in potential reservoirs.
  52. <h2>EXAMPLE</h2>
  53. The following report was generated by the command (North Carolina dataset):
  54. <div class="code"><pre>
  55. # set computational region
  56. g.region raster=elevation
  57. # compute volume
  58. r.volume input=elevation clump=geology_30m
  59. Volume report on data from &lt;elevation&gt; using clumps on &lt;geology_30m&gt; raster map
  60. Category Average Data # Cells Centroid Total
  61. Number in clump Total in clump Easting Northing Volume
  62. -----------------------------------------------------------------------------
  63. 217 118.93 86288828 725562 635325.00 221535.00 8628882798.63
  64. 262 108.97 21650560 198684 638935.00 222495.00 2165056037.02
  65. 270 92.23 63578874 689373 642405.00 221485.00 6357887443.53
  66. 405 132.96 33732662 253710 631835.00 224095.00 3373266208.59
  67. 583 139.35 3011288 21609 630205.00 224665.00 301128821.55
  68. 720 124.30 599618 4824 634075.00 227995.00 59961816.06
  69. 766 132.43 936791 7074 631425.00 227845.00 93679120.08
  70. 862 118.31 7302317 61722 630505.00 218885.00 730231746.74
  71. 910 94.20 4235816 44964 639215.00 216365.00 423581613.11
  72. 921 135.22 1693985 12528 630755.00 215445.00 169398523.05
  73. 945 127.24 1145 9 630015.00 215015.00 114512.03
  74. 946 89.91 365748 4068 639085.00 215255.00 36574833.85
  75. 948 129.02 112632 873 630185.00 215115.00 11263181.57
  76. -----------------------------------------------------------------------------
  77. Total Volume = 22351026655.81
  78. </pre></div>
  79. The <tt>Data Total</tt> column is the sum of the elevations for each
  80. in each of the fields. The <tt>Total Volume</tt> is the sum
  81. multiplied by the east-west resolution times the north-south
  82. resolution. Note that the units on the volume may be difficult if the
  83. units of cell values on the <b>input</b> raster map and the resolution
  84. units differ.
  85. <h2>SEE ALSO</h2>
  86. <em>
  87. <a href="r.clump.html">r.clump</a>,
  88. <a href="r.mask.html">r.mask</a>,
  89. <a href="r.mapcalc.html">r.mapcalc</a>
  90. </em>
  91. <h2>AUTHORS</h2>
  92. Dr. James Hinthorne, Central Washington University GIS Laboratory,
  93. December 1988.<br>
  94. Updated to GRASS 7 by Martin Landa, Czech Technical University in Prague, Czech Republic
  95. <p>
  96. <i>Last changed: $Date$</i>