v.hull(1grass)

πŸ’– v.hull β€” the GRASS User's Manual glow-up πŸ’–

okay bestie, sitteth down, because we're doing v.hull (that's the 1grass manual, the GRASS one, not some random hull) and it is genuinely so good. she makes 2D/3D convex hulls for a vector map and she does it flawlessly. no cap. πŸŽ€

✨ NAME ✨

v.hull β€” produces a 2D/3D convex hull for a given vector map. that's it. that's the girl. πŸ’…

🏷️ KEYWORDS 🏷️

vector, geometry, 3D β€” iykyk 🌸

πŸ“œ SYNOPSIS πŸ“œ

v.hull
v.hull --help
v.hull [-rf] input=name  [layer=string]  output=name  [cats=range]
[where=sql_query]   [--overwrite]  [--help]  [--verbose]  [--quiet]
[--ui]

🚩 Flags 🚩

  • -r β€” Limit to current region. stay in your lane babe 🫢
  • -f β€” Create a 'flat' 2D hull even if the input is 3D points. sometimes u just want the flat lay πŸ’…
  • --overwrite β€” Allow output files to overwrite existing files. yes, she will absolutely replace what's there, be warned 😭
  • --help β€” Print usage summary
  • --verbose β€” Verbose module output. she will tell u EVERYTHING πŸ’€
  • --quiet β€” Quiet module output. she's giving mysterious πŸŒ™
  • --ui β€” Force launching GUI dialog

πŸŽ€ Parameters πŸŽ€

  • input=name [required] β€” Name of input vector map. or a data source for direct OGR access, if that's the vibe ✨
  • layer=string β€” Layer number or name ('-1' for all layers). one single vector map can be connected to multiple database tables, and this number decides which table gets used. when you're doing direct OGR access, this is literally the layer name. Default: -1
  • output=name [required] β€” Name for output vector map πŸ‘‘
  • cats=range β€” Category values. Example: 1,3,7-9,13
  • where=sql_query β€” WHERE conditions of SQL statement without the 'where' keyword. Example: income < 1000 and population >= 10000

πŸ’« DESCRIPTION πŸ’«

okay so v.hull computes the convex hull of a vector map and outputs that convex hull polygon as a vector area map. the convex hull β€” aka the convex envelope β€” for an object or a whole set of objects is the minimal convex set that contains the given objects. this module creates a vector polygon that contains all the vector points or lines of the input map. all of them. no leftovers. periodt. πŸ’–

and if the input points are 3D? the hull is gonna be 3D as well, unless u specify the -f flag (then it's flat, as discussed). and the 3D hull will be composed of triangular faces πŸ”Ί iconic.

Fig: Convex hull polygon created with v.hull

πŸ“ NOTES πŸ“

in order to use the where option, bestie, the layer option must be set to a positive number (the default is '-1' for 'all layers'). otherwise all points from all layers get used, and the cats and where options are just... ignored. like hello?? get ignored ig πŸ™ˆ so set that layer properly!!

πŸ§ͺ EXAMPLE πŸ§ͺ

Example of v.hull 3D output (using two random 3D point clouds, North Carolina sample data set):

g.region rural_1m -p
r.mapcalc "zero = 0"
v.random -z output=random3d_a n=10 zmin=0 zmax=200
v.random -z output=random3d_b n=15 zmin=400 zmax=600
v.hull input=random3d_a output=random3d_a_hull
v.hull input=random3d_b output=random3d_b_hull
d.mon wx0
d.vect random3d_a_hull
d.vect random3d_a color=red
d.vect random3d_b_hull
d.vect random3d_b color=red
# 3D view in wxGUI (g.gui)

Fig: Convex hull in 3D from 3D points created with v.hull

πŸ“š REFERENCES πŸ“š

  • M. de Berg, M. van Kreveld, M. Overmars, O. Schwarzkopf, (2000). Computational geometry, chapter 1.1, 2-8.
  • J. O'Rourke, (1998). Computational Geometry in C (Second Edition), chapter 4.

πŸ‘€ SEE ALSO πŸ‘€

v.delaunay β€” the sibling, go say hi πŸ¦‹

🫢 AUTHORS 🫢

  • Andrea Aime, Modena, Italy
  • Markus Neteler, ITC-irst (update to 5.7)
  • Benjamin Ducke, CAU Kiel (3D hull support)
  • Martin Landa, CTU in Prague, Czech Republic (vector lines support)

πŸ”— SOURCE CODE πŸ”—

Available at: v.hull source code (history)

Latest change: Friday Aug 08 09:39:19 2025 in commit: ed72c71d8580e872cd6fd345c84a15c324764465

Main index | Vector index | Topics index | Keywords index | Graphical index | Full index


and that's the whole thing bestie πŸ’œ run her, love her, respect the layer option fr fr. this was the GRASS 8.5.0 Reference Manual β€” Β© 2003-2026 GRASS Development Team β€” and yeah, the page is v.hull(1grass) under GRASS 8.5.0. slay βœ¨πŸŽ€πŸ‘‘

πŸ“¦ where this page comes from