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: -1
  • output=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.25
  • thin=float β€” maximum dangle length of skeletons. applies only to skeleton extraction. Default = -1 will 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