| 1 |
<h2>DESCRIPTION</h2> |
| 2 |
|
| 3 |
<em>v.buffer</em> creates a buffer around features of |
| 4 |
given <b>type</b>, which have a category in the |
| 5 |
given <b>layer</b>. The <b>tolerance</b> controls the number of vector |
| 6 |
segments being generated (the smaller the value, the more vector |
| 7 |
segments are generated). |
| 8 |
|
| 9 |
<h2>NOTES</h2> |
| 10 |
|
| 11 |
Internal buffers for areas can be generated with negative distance |
| 12 |
values ("inward buffer" or "negative buffer" or "shrinking"). |
| 13 |
|
| 14 |
<p> |
| 15 |
<em>v.buffer</em> fusions the geometries of buffers by default. |
| 16 |
Categories and attribute table will not be transferred (this would |
| 17 |
not make sense as one buffer geometry can be the result of many |
| 18 |
different input geometries). To transfer the categories and |
| 19 |
attributes the user can set the <b>-t</b> flag. This will result in |
| 20 |
buffers being cut up where buffers of individual input geometries |
| 21 |
overlap. Each part that is the result of overlapping buffers of |
| 22 |
multiple geometries will have multiple categories corresponding to |
| 23 |
those geometries, and multiple buffer areas can have the same |
| 24 |
category. The buffer for the input feature with category X can thus |
| 25 |
be retrieved by selecting all buffer areas with category X (see |
| 26 |
example below). |
| 27 |
|
| 28 |
<p> |
| 29 |
Buffers for lines and areas are generated using the algorithms from |
| 30 |
the GEOS library. |
| 31 |
|
| 32 |
<p> |
| 33 |
<i>For advanced users:</i> the built-in buffer algorithm is no longer |
| 34 |
used, as we use GEOS instead. If GRASS was not compiled with GEOS support |
| 35 |
or the <a href="variables.html">environmental |
| 36 |
variable</a> <code>GRASS_VECTOR_BUFFER</code> is defined, then GRASS |
| 37 |
generates buffers using the built-in buffering algorithm (which is still |
| 38 |
buggy for some input data). |
| 39 |
|
| 40 |
<p> |
| 41 |
The options <b>minordistance</b>, <b>angle</b>, <b>tolerance</b> are |
| 42 |
kept for backward compatibility and have no effect with GEOS buffering. |
| 43 |
|
| 44 |
<h3>Corner settings</h3> |
| 45 |
|
| 46 |
The following vector line related corners (also called "cap") exist: |
| 47 |
<ul> |
| 48 |
<li>no cap: <img src="v_buffer_no_cap.png" valign="middle" alt="line buffer: no cap"></li> |
| 49 |
<li>rounded cap: <img src="v_buffer_rounded_cap.png" valign="middle" alt="line buffer: rounded cap"></li> |
| 50 |
<li>square cap: <img src="v_buffer_square_cap.png" valign="middle" alt="line buffer: square cap"></li> |
| 51 |
</ul> |
| 52 |
|
| 53 |
By default <em>v.buffer</em> creates rounded buffers (blue color on |
| 54 |
figure below): |
| 55 |
|
| 56 |
<center> |
| 57 |
<img src="v_buffer_line.png"> |
| 58 |
</center> |
| 59 |
|
| 60 |
Straight corners with caps are created using the <b>-s</b> flag (red color on |
| 61 |
the figure below), while the <b>-c</b> flag doesn't make caps at the ends of |
| 62 |
polylines (green color on the figure below): |
| 63 |
|
| 64 |
<center> |
| 65 |
<img src="v_buffer_line_s.png"> |
| 66 |
<img src="v_buffer_line_c.png"> |
| 67 |
</center> |
| 68 |
|
| 69 |
With a point vector map as input data, square buffers are created instead |
| 70 |
of round buffers by using the <b>-s</b> flag. |
| 71 |
|
| 72 |
<center> |
| 73 |
<img src="v_buffer_point_s.png"> |
| 74 |
</center> |
| 75 |
|
| 76 |
<!-- Only support by GRASS buffer |
| 77 |
Flag <b>-s</b> also influences corners around polygons (see red color |
| 78 |
on the figure below): |
| 79 |
|
| 80 |
<center> |
| 81 |
<img src="v_buffer_area.png"> |
| 82 |
<img src="v_buffer_area_s.png"> |
| 83 |
</center> |
| 84 |
--> |
| 85 |
|
| 86 |
<h2>EXAMPLES</h2> |
| 87 |
|
| 88 |
All examples are based on the North Carolina sample dataset. |
| 89 |
|
| 90 |
<h3>Buffer around input lines</h3> |
| 91 |
|
| 92 |
<div class="code"><pre> |
| 93 |
v.buffer input=roadsmajor output=roadsmajor_buffer type=line distance=100 |
| 94 |
</pre></div> |
| 95 |
|
| 96 |
<center> |
| 97 |
<img src="v_buffer_lines.png" border="1"><br> |
| 98 |
Buffer of 100m along the "roadsmajor" lines (map subset, original center line |
| 99 |
shown in black) |
| 100 |
</center> |
| 101 |
|
| 102 |
<h3>Circles around input points</h3> |
| 103 |
|
| 104 |
<div class="code"><pre> |
| 105 |
v.buffer input=hospitals output=hospitals_circled type=point distance=2000 |
| 106 |
</pre></div> |
| 107 |
|
| 108 |
<center> |
| 109 |
<img src="v_buffer_points.png" border="1"><br> |
| 110 |
Buffer of 2000m around the "hospitals" points (map subset, original points |
| 111 |
shown in black, new area centroids in red) |
| 112 |
</center> |
| 113 |
|
| 114 |
<h3>Circles around input points with attribute transfer</h3> |
| 115 |
|
| 116 |
<div class="code"><pre> |
| 117 |
v.buffer input=hospitals output=hospitals_circled type=point distance=1000 -t |
| 118 |
|
| 119 |
# display buffer around hospital with category 36, |
| 120 |
# this buffer is composed of several areas: |
| 121 |
d.vect map=hospitals_circled type=area layer=1 cats=36 |
| 122 |
# extract this buffer, dissolving boundaries |
| 123 |
v.extract in=hospitals_circled output=hospital_36_circled layer=1 cats=36 -d |
| 124 |
</pre></div> |
| 125 |
|
| 126 |
<h3>Buffer around input areas</h3> |
| 127 |
|
| 128 |
<div class="code"><pre> |
| 129 |
v.buffer input=lakes output=lakes_buffer type=area distance=100 |
| 130 |
</pre></div> |
| 131 |
|
| 132 |
<center> |
| 133 |
<img src="v_buffer_areas.png" border="1"><br> |
| 134 |
Buffer of 100m around the "lakes" polygons (map subset, original areas |
| 135 |
shown in black) |
| 136 |
</center> |
| 137 |
|
| 138 |
<h3>Buffer inside input areas</h3> |
| 139 |
|
| 140 |
In this example, an internal buffer ("inward buffer" or "negative buffer") |
| 141 |
is generated using a negative <b>distance</b> value: |
| 142 |
|
| 143 |
<div class="code"><pre> |
| 144 |
v.buffer input=lakes output=lakes_buffer type=area distance=-50 |
| 145 |
</pre></div> |
| 146 |
|
| 147 |
<center> |
| 148 |
<img src="v_buffer_areas_int.png" border="1"><br> |
| 149 |
Internal buffer of 50m inside the "lakes" polygons (map subset, original areas |
| 150 |
shown in black) <br> |
| 151 |
Not all features are buffered, only the polygons that allow creation inside |
| 152 |
a topological cleaned polygon. |
| 153 |
</center> |
| 154 |
|
| 155 |
<h2>REFERENCES</h2> |
| 156 |
|
| 157 |
<ul> |
| 158 |
<li><a href="https://trac.osgeo.org/geos">GEOS Library</a></li> |
| 159 |
</ul> |
| 160 |
|
| 161 |
<h2>SEE ALSO</h2> |
| 162 |
|
| 163 |
<em> |
| 164 |
<a href="r.buffer.html">r.buffer</a>, |
| 165 |
<a href="v.parallel.html">v.parallel</a>, |
| 166 |
<a href="v.extract.html">v.extract</a>, |
| 167 |
<a href="v.type.html">v.type</a>, |
| 168 |
<a href="v.patch.html">v.patch</a>, |
| 169 |
<a href="v.db.connect.html">v.db.connect</a> |
| 170 |
</em> |
| 171 |
|
| 172 |
<h2>AUTHORS</h2> |
| 173 |
|
| 174 |
Radim Blazek<br> |
| 175 |
Rewritten by Rosen Matev (with support through the |
| 176 |
Google Summer of Code program 2008)<br> |
| 177 |
Rewritten by Markus Metz (2011, 2012) |