r.object.geometry.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <h2>DESCRIPTION</h2>
  2. <p>
  3. <em>r.object.geometry</em> calculates form statistics of raster objects
  4. in the <b>input</b> map and writes it to the <b>output</b> text file
  5. (or standard output if no output filename or '-' is given),
  6. with fields separated by the chosen <b>separator</b>. Objects are defined
  7. as clumps of adjacent cells with the same category value (e.g. output of
  8. <em><a href="r.clump.html">r.clump</a></em> or
  9. <em><a href="i.segment.html">i.segment</a></em>).
  10. <p>
  11. By default, values are in pixels. If values in meters is desired, the user
  12. can set the <b>-m</b> flag. If the current working region is in lat-long or
  13. has non-square pixels, using meters is recommended.
  14. <p>
  15. Statistics currently calculated are exactly the same as in
  16. <em><a href="v.to.db.html">v.to.db</a></em> (except for compact_square and
  17. mean coordinates):
  18. <ul>
  19. <li>area</li>
  20. <li>perimeter</li>
  21. <li>compact_square (compactness compared to a square:
  22. <tt>compact_square = 4 * sqrt(area) / perimeter</tt>)
  23. <li>compact_circle (compactness compared to a circle:
  24. <tt>compact_circle = perimeter / ( 2 * sqrt(PI * area) )</tt>)</li>
  25. <li>fractal dimension ( <tt>fd = 2 * ( log(perimeter) / log(area + 0.001) )</tt> )</li>
  26. <li>mean x coordinate of object (in map units)</li>
  27. <li>mean y coordinate of object (in map units)</li>
  28. </ul>
  29. <h2>EXAMPLE</h2>
  30. <div class="code"><pre>
  31. g.region raster=soilsID
  32. r.object.geometry input=soilsID output=soils_geom.txt
  33. </pre></div>
  34. <h2>SEE ALSO</h2>
  35. <em>
  36. <a href="i.segment.html">i.segment</a>,
  37. <a href="r.clump.html">r.clump</a>,
  38. <a href="v.to.db.html">v.to.db</a>
  39. </em>
  40. <h2>AUTHORS</h2>
  41. Moritz Lennert<br>
  42. Markus Metz (diagonal clump tracing)