v.centroids(1grass)
π v.centroids β the GRASS User's Manual glow-up π
okay bestie, welcome to v.centroids(1grass) β this is the GRASS manual page for v.centroids, and she's here to give your closed boundaries the centroid they've been missing. no cap, it's literally the whole job.
β¨ NAME β¨
v.centroids β adds missing centroids to closed boundaries. that's it. that's her whole personality and she ate. π
π¦ KEYWORDS π¦
vector, centroid, area
πΈ SYNOPSIS πΈ
v.centroids
v.centroids --help
v.centroids input=name output=name [option=string] [layer=string]
[cat=integer] [step=integer] [--overwrite] [--help] [--verbose]
[--quiet] [--ui]
β Flags β
--overwriteβ let the output files just bulldoze whatever's already sitting there. full main character energy, but like, watch out.--helpβ prints the usage summary, aka the tl;dr.--verboseβ verbose module output, she's a yapper and we love her.--quietβ quiet module output, shhh, no thoughts head empty.--uiβ forces the GUI dialog to launch. fancy.
π Parameters π
input=name[required] β name of the input vector map. or, plot twist, a data source for direct OGR access.output=name[required] β name for the output vector map, so she has somewhere to live.option=stringβ the action to be taken. Options:add. Default:add.layer=stringβ layer number or name. vector features can carry category values in different layers, and this number picks which layer to use. when you're doing direct OGR access, this is the layer name instead. Default:1.cat=integerβ category number starting value. Default:1.step=integerβ category increment. Default:1.
π DESCRIPTION π
so in GRASS, a centroid is a point sitting inside a closed ring of boundaries. a vector area is defined as a composite entity β a whole little outfit β consisting of a set of closed boundaries plus a centroid. the attribute info linked to that area? yeah, that's attached to the centroid. π
the v.centroids module adds centroids to closed boundaries in the input file and assigns a category number to them. the starting value and the increment size can both be set with optional parameters, so you fully control the numbering vibe.
multiple attributes can be linked to a single vector entity through numbered fields called layers. go read v.category for the details, because v.centroids is simply a frontend to that module. she's dressed as a whole new program but she's really just proxying. π
here's the lore though: the boundary itself is often stored without any category reference, since it can mark the border between two adjacent areas. so it would be ambiguous which feature the attribute belongs to. in some cases that boundary might, for example, represent a road between two parcels of land β and in this case it is entirely appropriate for the boundary to contain category information. so like, context matters bestie, boundaries can have info or not, it depends. π
π EXAMPLES π
creating an area from a closed line, using the North Carolina sample dataset:
v.type input=busroute11 output=busroute11_boundary from_type=line to_type=boundary
v.centroids input=busroute11_boundary output=busroute11_area
Figure: creating area from closed line. β¨ iconic. no notes.
π«Ά SEE ALSO π«Ά
v.category
π AUTHORS π
- module: M. Hamish Bowman, Dept. Marine Science, Otago University, New Zealand
- help page: Trevor Wiens
π₯ SOURCE CODE π₯
available at: v.centroids 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
okay that's the whole page, mwah π quick lil sign-off from your favorite manual: this was GRASS 8.5.0, Β© 2003-2026 GRASS Development Team, pulled straight from the GRASS 8.5.0 Reference Manual. go add some centroids, bestie, you've got this π¦π
π¦ 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