v.voronoi(1)

✨ v.voronoi β€” the manual, but make it make sense ✨

okay bestie, so this is the GRASS GIS User's Manual page for v.voronoi, and honestly? it's giving geometry icon energy. let's get into it πŸ’…

KEYWORDS: vector, geometry, triangulation, skeleton


🌸 NAME 🌸

v.voronoi β€” creates a Voronoi diagram constrained to the extents of the current region, built from an input vector map that's full of points or centroids. periodt.


🌈 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 but for input areas (not just points, bestie)
  • -s β€” extract skeletons for input areas
  • -l β€” output the tessellation as a graph (lines), not as areas
  • -t β€” do not create an attribute table, we're keeping it light
  • --overwrite β€” allow output files to overwrite existing files (careful, she's bold)
  • --help β€” print usage summary
  • --verbose β€” verbose module output
  • --quiet β€” quiet module output
  • --ui β€” force launching GUI dialog

πŸ¦‹ PARAMETERS πŸ¦‹

  • input=name [required] β€” name of input vector map. or, plot twist, 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 output vector map. yes queen, name your creation.
  • smoothness=float β€” factor for output smoothness. applies to input areas only. smaller values β†’ smoother output, but heads up, they 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 (aka Thiessen polygons) from points or centroids. that's the whole vibe.

the bounds of the output map are limited by the current region (go peek at g.region if you need a refresher).

the -a flag lets you create a Voronoi diagram for areas.

the -s flag lets you extract the center line of areas, or skeletons of areas with thin >= 0. smaller values for the thin option preserve more detail, while negative values extract only the center line. iykyk.


πŸ”₯ NOTES πŸ”₯

v.voronoi suffers from numerical instability, and results can sometimes contain a whole lot of artefacts. it's not her fault, it's just like that.

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 not skip this step, bestie, i'm begging πŸ™ˆ

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 do exist, but they are not yet implemented. 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)

Accessed: Saturday Jan 17 05:41:34 2026

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

Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual


and that's the whole page, bestie 🫢 this was GRASS GIS 8.4.2, and the manpage itself answers to v.voronoi(1). go make some polygons, slay πŸ’…βœ¨

πŸ“¦ where this page comes from