r.grow.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <h2>DESCRIPTION</h2>
  2. <em>r.grow</em> adds cells around the perimeters of all areas
  3. in a user-specified raster map layer and stores the output in
  4. a new raster map layer. The user can use it to grow by one or
  5. more than one cell (by varying the size of the <b>radius</b>
  6. parameter), or like <em>r.buffer</em>, but with the
  7. option of preserving the original cells (similar to combining
  8. <em>r.buffer</em> and <em>r.patch</em>).
  9. <h2>NOTES</h2>
  10. The user has the option of specifying three different metrics which
  11. control the geometry in which grown cells are created, (controlled by
  12. the <b>metric</b> parameter): <i>Euclidean</i>, <i>Manhattan</i>, and
  13. <i>Maximum</i>.
  14. <p>The <i>Euclidean distance</i> or <i>Euclidean metric</i> is the "ordinary" distance
  15. between two points that one would measure with a ruler, which can be
  16. proven by repeated application of the Pythagorean theorem.
  17. The formula is given by:
  18. <div class="code"><pre>d(dx,dy) = sqrt(dx^2 + dy^2)</pre></div>
  19. Cells grown using this metric would form isolines of distance that are
  20. circular from a given point, with the distance given by the <b>radius</b>.
  21. <p>The <i>Manhattan metric</i>, or <i>Taxicab geometry</i>, is a form of geometry in
  22. which the usual metric of Euclidean geometry is replaced by a new
  23. metric in which the distance between two points is the sum of the (absolute)
  24. differences of their coordinates. The name alludes to the grid layout of
  25. most streets on the island of Manhattan, which causes the shortest path a
  26. car could take between two points in the city to have length equal to the
  27. points' distance in taxicab geometry.
  28. The formula is given by:
  29. <div class="code"><pre>d(dx,dy) = abs(dx) + abs(dy)</pre></div>
  30. where cells grown using this metric would form isolines of distance that are
  31. rhombus-shaped from a given point.
  32. <p>The <i>Maximum metric</i> is given by the formula
  33. <div class="code"><pre>d(dx,dy) = max(abs(dx),abs(dy))</pre></div>
  34. where the isolines of distance from a point are squares.
  35. <p>If there are two cells which are equal candidates to grow into an empty space,
  36. <em>r.grow</em> will choose the northernmost candidate; if there are multiple
  37. candidates with the same northing, the westernmost is chosen.
  38. <h2>EXAMPLE</h2>
  39. In this example, the lakes map in the
  40. North Carolina sample dataset location is buffered:
  41. <div class="code"><pre>
  42. g.region rast=lakes -p
  43. r.grow input=lakes output=lakes_grown_50m radius=10
  44. </pre></div>
  45. <h2>SEE ALSO</h2>
  46. <em>
  47. <a href="r.buffer.html">r.buffer</a>,
  48. <a href="r.grow.distance.html">r.grow.distance</a>,
  49. <a href="r.patch.html">r.patch</a>
  50. </em>
  51. <p><em><a href="http://en.wikipedia.org/wiki/Euclidean_metric">Wikipedia Entry: Euclidean Metric</a></em><br>
  52. <em><a href="http://en.wikipedia.org/wiki/Manhattan_metric">Wikipedia Entry: Manhattan Metric</a></em>
  53. <h2>AUTHORS</h2>
  54. Marjorie Larson,
  55. U.S. Army Construction Engineering Research Laboratory
  56. <p>Glynn Clements
  57. <p><i>Last changed: $Date$</i>