v.buffer.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <h2>DESCRIPTION</h2>
  2. <em>v.buffer</em> creates a buffer around features of
  3. given <b>type</b>, which have a category in the
  4. given <b>layer</b>. The <b>tolerance</b> controls the number of vector
  5. segments being generated (the smaller the value, the more vector
  6. segments are generated).
  7. <h2>NOTES</h2>
  8. Internal buffers for areas can be generated with negative distance
  9. values ("inward buffer" or "negative buffer").
  10. <p>
  11. Categories and attributes can be transferred with the <b>t</b> flag.
  12. The resulting buffer areas can have multiple categories, and multiple
  13. buffer areas can have the same category. The buffer for the input
  14. feature with category X can thus be retrieved by selecting all buffer
  15. areas with category X (see example below).
  16. <p>
  17. Buffers for lines and areas are generated using the algorithms from
  18. the GEOS library.
  19. <!-- built-in buffer algorithm no longer desired, we use GEOS:
  20. If GRASS is not compiled with GEOS support or environmental
  21. variable <tt>GRASS_VECTOR_BUFFER</tt> is defined, then GRASS generates
  22. buffers using built-in buffering algorithm (which is still buggy for
  23. some input data).
  24. -->
  25. <h2>EXAMPLES</h2>
  26. All examples are based on the North Carolina sample dataset.
  27. <h3>Buffer around input lines</h3>
  28. <div class="code"><pre>
  29. v.buffer input=roadsmajor output=roadsmajor_buffer type=line distance=100
  30. </pre></div>
  31. <center>
  32. <img src="v_buffer_lines.png" border="1"><br>
  33. Buffer of 100m along the "roadsmajor" lines (map subset, original center line
  34. shown in black)
  35. </center>
  36. <h3>Circles around input points</h3>
  37. <div class="code"><pre>
  38. v.buffer input=hospitals output=hospitals_circled type=point distance=2000
  39. </pre></div>
  40. <center>
  41. <img src="v_buffer_points.png" border="1"><br>
  42. Buffer of 2000m around the "hospitals" points (map subset, original points
  43. shown in black, new area centroids in red)
  44. </center>
  45. <h3>Circles around input points with attribute transfer</h3>
  46. <div class="code"><pre>
  47. v.buffer input=hospitals output=hospitals_circled type=point distance=1000 -t
  48. # display buffer around hospital with category 36,
  49. # this buffer is composed of several areas:
  50. d.vect map=hospitals_circled type=area layer=1 cats=36
  51. # extract this buffer, dissolving boundaries
  52. v.extract in=hospitals_circled output=hospital_36_circled layer=1 cats=36 -d
  53. </pre></div>
  54. <h3>Buffer around input areas</h3>
  55. <div class="code"><pre>
  56. v.buffer input=lakes output=lakes_buffer type=area distance=100
  57. </pre></div>
  58. <center>
  59. <img src="v_buffer_areas.png" border="1"><br>
  60. Buffer of 100m around the "lakes" polygons (map subset, original areas
  61. shown in black)
  62. </center>
  63. <h2>REFERENCE</h2>
  64. <ul>
  65. <li><a href="http://trac.osgeo.org/geos">GEOS Library</a></li>
  66. </ul>
  67. <h2>SEE ALSO</h2>
  68. <em>
  69. <a href="r.buffer.html">r.buffer</a>,
  70. <a href="v.parallel.html">v.parallel</a>,
  71. <a href="v.extract.html">v.extract</a>,
  72. <a href="v.type.html">v.type</a>,
  73. <a href="v.patch.html">v.patch</a>,
  74. <a href="v.db.connect.html">v.db.connect</a>
  75. </em>
  76. <h2>AUTHORS</h2>
  77. Radim Blazek<br>
  78. Rewritten by Rosen Matev (with support through the
  79. Google Summer of Code program 2008)<br>
  80. Rewritten by Markus Metz (2011, 2012)
  81. <p>
  82. <i>Last changed: $Date$</i>