| 1 |
<h2>DESCRIPTION</h2> |
| 2 |
|
| 3 |
<em>v.voronoi</em> creates a Voronoi diagram (Thiessen polygons) from |
| 4 |
points or centroids. |
| 5 |
<p>The bounds of the output map are limited by the current region |
| 6 |
(see <em><a href="g.region.html">g.region</a></em>). |
| 7 |
|
| 8 |
<p> |
| 9 |
The <em>-a</em> flag can be used to create a Voronoi diagram for areas. |
| 10 |
|
| 11 |
<p> |
| 12 |
The <em>-s</em> flag can be used to extract the center line of areas or |
| 13 |
skeletons of areas with <em>thin</em> >= 0. Smaller values for the |
| 14 |
<em>thin</em> option will preserve more detail, while negative values |
| 15 |
will extract only the center line. |
| 16 |
|
| 17 |
<h2>NOTES</h2> |
| 18 |
|
| 19 |
<em>v.voronoi</em> suffers from numerical instability, results can |
| 20 |
sometimes contain many artefacts. When creating Voronoi diagrams for areas |
| 21 |
or skeletons for areas, it is highly recommended to simplify the areas first |
| 22 |
with <em><a href="v.generalize.html">v.generalize</a></em>. |
| 23 |
|
| 24 |
<p> |
| 25 |
Voronoi diagrams may be used for nearest-neighbor flood filling. |
| 26 |
Give the centroids attributes (start with |
| 27 |
<em><a href="v.db.addcolumn.html">v.db.addcolumn</a></em>), |
| 28 |
then optionally convert the result to a raster map with |
| 29 |
<em><a href="v.to.rast.html">v.to.rast</a></em>. |
| 30 |
|
| 31 |
<p> |
| 32 |
The extraction of skeletons and center lines with the <em>-s</em> flag |
| 33 |
is a brute force approach. Faster and more accurate algorithms to |
| 34 |
extract skeletons from areas exist but are not yet implemented. In the |
| 35 |
meantime, skeletons and center lines can be simplified with the |
| 36 |
Douglas-Peucker algorithm: |
| 37 |
<em><a href="v.generalize.html">v.generalize method=douglas</a></em>. |
| 38 |
|
| 39 |
<h2>EXAMPLE</h2> |
| 40 |
|
| 41 |
<h3>Voronoi diagram for points</h3> |
| 42 |
This example uses the hospitals in the North Carolina dataset. |
| 43 |
<div class="code"><pre> |
| 44 |
g.region -p raster=elev_state_500m |
| 45 |
v.voronoi input=hospitals output=hospitals_voronoi |
| 46 |
</pre></div> |
| 47 |
|
| 48 |
Result: |
| 49 |
<center> |
| 50 |
<img src="v_voronoi_points.png" border="0"><br> |
| 51 |
<i>Voronoi diagram for hospitals in North Carolina</i> |
| 52 |
</center> |
| 53 |
|
| 54 |
<h3>Voronoi diagram for areas</h3> |
| 55 |
This example uses urban areas in the North Carolina dataset. |
| 56 |
<div class="code"><pre> |
| 57 |
g.region -p n=162500 s=80000 w=727000 e=846000 res=500 |
| 58 |
v.voronoi input=urbanarea output=urbanarea_voronoi -a |
| 59 |
</pre></div> |
| 60 |
|
| 61 |
Result: |
| 62 |
<center> |
| 63 |
<img src="v_voronoi_areas.png" border="0"><br> |
| 64 |
<i>Voronoi diagram for urban areas in North Carolina</i> |
| 65 |
</center> |
| 66 |
|
| 67 |
<h3>Skeletons and center lines of areas</h3> |
| 68 |
This example uses urban areas in the North Carolina dataset. |
| 69 |
<div class="code"><pre> |
| 70 |
g.region -p n=161000 s=135500 w=768500 e=805500 res=500 |
| 71 |
v.voronoi input=urbanarea output=urbanarea_centerline -s |
| 72 |
v.voronoi input=urbanarea output=urbanarea_skeleton -s thin=2000 |
| 73 |
</pre></div> |
| 74 |
|
| 75 |
Result: |
| 76 |
<center> |
| 77 |
<img src="v_voronoi_skeleton.png" border="0"><br> |
| 78 |
<i>Skeleton (blue) and center line (red) for urban areas in North Carolina</i> |
| 79 |
</center> |
| 80 |
|
| 81 |
<h2>REFERENCES</h2> |
| 82 |
|
| 83 |
<em>Steve J. Fortune, (1987). A Sweepline Algorithm for |
| 84 |
Voronoi Diagrams, Algorithmica 2, 153-174 |
| 85 |
(<a href="https://doi.org/10.1007/BF01840357">DOI</a>).</em> |
| 86 |
|
| 87 |
<h2>SEE ALSO</h2> |
| 88 |
|
| 89 |
<em> |
| 90 |
<a href="g.region.html">g.region</a>, |
| 91 |
<a href="v.delaunay.html">v.delaunay</a>, |
| 92 |
<a href="v.hull.html">v.hull</a> |
| 93 |
</em> |
| 94 |
<p> |
| 95 |
<a href="https://en.wikipedia.org/wiki/Voronoi_diagram">Voronoi diagram (Wikipedia)</a> |
| 96 |
|
| 97 |
<h2>AUTHORS</h2> |
| 98 |
|
| 99 |
James Darrell McCauley, Purdue University<br> |
| 100 |
GRASS 5 update, improvements: <a href="mailto:[email protected]">Andrea Aime</a>, Modena, Italy<br> |
| 101 |
GRASS 5.7 update: Radim Blazek<br> |
| 102 |
Markus Metz |