| 1 |
<h2>DESCRIPTION</h2> |
| 2 |
|
| 3 |
<em>v.hull</em> computes the convex hull of a vector map and outputs |
| 4 |
the convex hull polygon as a vector area map. The convex hull, or |
| 5 |
convex envelope, for an object or a set of objects is the minimal |
| 6 |
convex set containing the given objects. This module creates a vector |
| 7 |
polygon containing all vector points or lines of the input map. |
| 8 |
|
| 9 |
<p>In the case of 3D input points, the hull will be a 3D hull as well, |
| 10 |
unless the user specifies the <b>-f</b> flag. The 3D hull will be |
| 11 |
composed of triangular faces. |
| 12 |
|
| 13 |
<center> |
| 14 |
<img src="v_hull.png" border="1"><br> |
| 15 |
Fig: Convex hull polygon created with <em>v.hull</em> |
| 16 |
</center> |
| 17 |
|
| 18 |
<h2>NOTES</h2> |
| 19 |
|
| 20 |
In order to use the <b>where</b> option the <b>layer</b> option must |
| 21 |
be set to a positive number (the default is '-1' for 'all layers'), otherwise |
| 22 |
all points from all layers will be used and the <b>cats</b> and <b>where</b> |
| 23 |
options will be ignored. |
| 24 |
|
| 25 |
<h2>EXAMPLE</h2> |
| 26 |
|
| 27 |
Example of <em>v.hull</em> 3D output (using two random 3D point |
| 28 |
clouds, North Carolina sample data set): |
| 29 |
|
| 30 |
<div class="code"><pre> |
| 31 |
g.region rural_1m -p |
| 32 |
r.mapcalc "zero = 0" |
| 33 |
v.random -z output=random3d_a n=10 zmin=0 zmax=200 |
| 34 |
v.random -z output=random3d_b n=15 zmin=400 zmax=600 |
| 35 |
v.hull input=random3d_a output=random3d_a_hull |
| 36 |
v.hull input=random3d_b output=random3d_b_hull |
| 37 |
|
| 38 |
d.mon wx0 |
| 39 |
d.vect random3d_a_hull |
| 40 |
d.vect random3d_a color=red |
| 41 |
|
| 42 |
d.vect random3d_b_hull |
| 43 |
d.vect random3d_b color=red |
| 44 |
|
| 45 |
# 3D view in wxGUI (g.gui) |
| 46 |
</pre></div> |
| 47 |
|
| 48 |
<center> |
| 49 |
<img src="v_hull_3d.png" border="1"><br> |
| 50 |
Fig: Convex hull in 3D from 3D points created with <em>v.hull</em> |
| 51 |
</center> |
| 52 |
|
| 53 |
<h2>REFERENCES</h2> |
| 54 |
|
| 55 |
<ul> |
| 56 |
<li>M. de Berg, M. van Kreveld, M. Overmars, O. Schwarzkopf, |
| 57 |
(2000). Computational geometry, chapter 1.1, 2-8.</li> |
| 58 |
<li>J. O'Rourke, (1998). Computational Geometry in C (Second |
| 59 |
Edition), chapter 4.</li> |
| 60 |
</ul> |
| 61 |
|
| 62 |
<h2>SEE ALSO</h2> |
| 63 |
|
| 64 |
<em> |
| 65 |
<a href="v.delaunay.html">v.delaunay</a> |
| 66 |
</em> |
| 67 |
|
| 68 |
<h2>AUTHORS</h2> |
| 69 |
|
| 70 |
Andrea Aime, Modena, Italy<br> |
| 71 |
Markus Neteler, ITC-irst (update to 5.7)<br> |
| 72 |
Benjamin Ducke, CAU Kiel (3D hull support)<br> |
| 73 |
Martin Landa, CTU in Prague, Czech Republic (vector lines support) |