v.voronoi(1grass)
π v.voronoi π
okay bestie, welcome to v.voronoi from the GRASS User's Manual β the girlies who live in the GRASS 8.5.0 Reference Manual keep her filed under v.voronoi(1grass) and honestly? she SERVES. π¦
She creates a Voronoi diagram constrained to the extents of the current region, built from an input vector map full of points or centroids. it's giving geometry, it's giving triangulation, it's giving skeleton. periodt. β¨
<h2>KEYWORDS</h2>
vector, geometry, triangulation, skeleton
πΈ SYNOPSIS πΈ
v.voronoi
v.voronoi --help
v.voronoi [-aslt] input=name [layer=string] output=name
[smoothness=float] [thin=float] [--overwrite] [--help] [--verbose]
[--quiet] [--ui]
π Flags π
-aβ create a Voronoi diagram for input areas π-sβ extract skeletons for input areas π¦΄-lβ output the tessellation as a graph (lines), not as areas π-tβ do not create an attribute table π«--overwriteβ allow output files to overwrite existing files (be brave, bestie)--helpβ print the usage summary π«Ά--verboseβ verbose module output, she's chatty--quietβ quiet module output, she's mysterious π€«--uiβ force launching the GUI dialog π₯οΈ
π§ Parameters π§
input=name[required] β name of the input vector map. Or a data source for direct OGR access. π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 the layer name. Default:-1output=name[required] β name for the output vector map. the moment of creation β¨smoothness=floatβ factor for output smoothness. applies to input areas only. smaller values produce smoother output but can cause numerical instability π. Default:0.25thin=floatβ maximum dangle length of skeletons. applies only to skeleton extraction. Default =-1will extract the center line. Default:-1
π DESCRIPTION π
v.voronoi creates a Voronoi diagram (Thiessen polygons) from points or centroids. iconic behavior, no notes.
the bounds of the output map are limited by the current region (go peep g.region for that).
the -a flag can be used to create a Voronoi diagram for areas.
the -s flag can be used to extract the center line of areas, or skeletons of areas with thin >= 0. smaller values for the thin option will preserve more detail, while negative values will extract only the center line. π¦
π₯ NOTES π₯
so, real talk: v.voronoi suffers from numerical instability, and results can sometimes contain many artefacts. not her fault, she's doing her best π. when you're creating Voronoi diagrams for areas or skeletons for areas, it is highly recommended to simplify the areas first with v.generalize. do it. for me.
Voronoi diagrams may be used for nearest-neighbor flood filling. give the centroids attributes (start with v.db.addcolumn), then optionally convert the result to a raster map with v.to.rast. π
the extraction of skeletons and center lines with the -s flag is a brute force approach. faster and more accurate algorithms to extract skeletons from areas exist but are not yet implemented (bestie they're coming). in the meantime, skeletons and center lines can be simplified with the Douglas-Peucker algorithm: v.generalize method=douglas. π«Ά
π EXAMPLE π
Voronoi diagram for points
this example uses the hospitals in the North Carolina dataset.
g.region -p raster=elev_state_500m
v.voronoi input=hospitals output=hospitals_voronoi
Result: Voronoi diagram for hospitals in North Carolina π₯
Voronoi diagram for areas
this example uses urban areas in the North Carolina dataset.
g.region -p n=162500 s=80000 w=727000 e=846000 res=500
v.voronoi input=urbanarea output=urbanarea_voronoi -a
Result: Voronoi diagram for urban areas in North Carolina ποΈ
Skeletons and center lines of areas
this example uses urban areas in the North Carolina dataset.
g.region -p n=161000 s=135500 w=768500 e=805500 res=500
v.voronoi input=urbanarea output=urbanarea_centerline -s
v.voronoi input=urbanarea output=urbanarea_skeleton -s thin=2000
Result: Skeleton (blue) and center line (red) for urban areas in North Carolina πβ€οΈ
β REFERENCES β
Steve J. Fortune, (1987). A Sweepline Algorithm for Voronoi Diagrams, Algorithmica 2, 153-174 (DOI).
π SEE ALSO π
g.region, v.delaunay, v.hull
Voronoi diagram (Wikipedia)
π«Ά AUTHORS π«Ά
- James Darrell McCauley, Purdue University
- GRASS 5 update, improvements: Andrea Aime, Modena, Italy
- GRASS 5.7 update: Radim Blazek
- Markus Metz
π» SOURCE CODE π»
Available at: v.voronoi source code (history)
Latest change: Sunday Jul 27 05:53:30 2025 in commit: da409580ef15011f3bac379c76d41101c9e36347
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
okay and that's the whole page, bestie, we ate and left absolutely no crumbs πβ¨
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual β and the version living at the bottom is GRASS 8.5.0, aka v.voronoi(1grass), dated up through Sunday Jul 27 05:53:30 2025 and committed as da409580ef15011f3bac379c76d41101c9e36347. slay, go make some polygons π
ππ¦
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms