r.mode.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <h2>DESCRIPTION</h2>
  2. <em>r.mode</em> calculates the most frequently occurring value (i. e., mode)
  3. of data contained in a <em>cover</em> raster map layer for areas assigned
  4. the same category value in the user-specified <em>base</em> raster map
  5. layer. These modes are stored in the new <em>output</em> map layer.
  6. <p>The <em>output</em> map is actually a <em>reclass</em> of the <em>base</em>
  7. map.
  8. <p>The <b>base</b> parameter defines an existing raster map layer in the user's
  9. current mapset search path. For each group of cells assigned the same
  10. category value in the <em>base</em> map, the mode of the values assigned
  11. these cells in the <em>cover</em> map will be computed.
  12. <p>The <b>cover</b> parameter defines an existing raster map layer containing
  13. the values to be used to compute the mode within each category of the
  14. <em>base</em> map.
  15. <h2>NOTES</h2>
  16. The user should use the results of <em>r.mode</em> with care.
  17. Since this utility assigns a value to each
  18. cell which is based on global information (i.e., information at spatial
  19. locations other than just the location of the cell itself), the resultant
  20. map layer is only valid if the geographic region and mask settings are
  21. the same as they were at the time that the result map was created.
  22. <p>Results are affected by the current region settings and mask.
  23. <h2>EXAMPLE</h2>
  24. Mode of K-factor (erosion) for Spearfish fields:
  25. <div class="code"><pre>
  26. g.region raster=fields -p
  27. r.mode base=fields cover=soils.Kfactor output=K.by.farm.mode
  28. r.univar K.by.farm.mode
  29. </pre></div>
  30. <h2>SEE ALSO</h2>
  31. <em><a href="g.region.html">g.region</a></em>,
  32. <em><a href="r.category.html">r.category</a></em>,
  33. <em><a href="r.clump.html">r.clump</a></em>,
  34. <em><a href="r.describe.html">r.describe</a></em>,
  35. <em><a href="r.mapcalc.html">r.mapcalc</a></em>,
  36. <em><a href="r.mfilter.html">r.mfilter</a></em>,
  37. <em><a href="r.neighbors.html">r.neighbors</a></em>,
  38. <em><a href="r.reclass.html">r.reclass</a></em>,
  39. <em><a href="r.stats.html">r.stats</a></em>,
  40. <em><a href="r.statistics.html">r.statistics</a></em>,
  41. <em><a href="r.univar.html">r.univar</a></em>
  42. <h2>AUTHOR</h2>
  43. Michael Shapiro,
  44. U.S.Army Construction Engineering Research Laboratory
  45. <p><i>Last changed: $Date$</i>