v.centroids(1)
π v.centroids π
okay bestie, welcome to the GRASS GIS User's Manual page for v.centroids β she's a lil vector module with main character energy and she's here to help you β¨
π NAME π
v.centroids β adds missing centroids to closed boundaries. no cap, that's literally her whole job π
π 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β allow output files to overwrite existing files. yes she will absolutely clobber them, be so fr π--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 π«Άoutput=name[required] β name for output vector mapoption=stringβ the action to be taken. Options:add. Default:addlayer=stringβ layer number or name. vector features can have category values in different layers, and this number determines which layer to use. when you're doing direct OGR access, this is the layer name instead. Default:1cat=integerβ category number starting value. Default:1step=integerβ category increment. Default:1
π DESCRIPTION π
so in GRASS GIS, a centroid is a point that lives inside a closed ring of boundaries. a vector area is defined as a composite entity β a set of closed boundaries plus a centroid. and the attribute information that goes with that area? it's linked to the centroid, bestie. that's the whole point π
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 are both yours to set with the optional parameters. slay β¨
multiple attributes can be linked to a single vector entity through numbered fields referred to as layers. go read v.category for the full lore on that, because v.centroids is literally just a frontend to that module. iykyk π
now here's the vibe check on boundaries themselves: the boundary is often stored without any category reference at all, because it can mark the border between two adjacent areas. so if it had a category, it would be ambiguous which feature the attribute belonged to. in some cases it might, for example, represent a road between two parcels of land β and in that case it's entirely appropriate for the boundary to contain category information. context matters, periodt π¦
π EXAMPLES π
create 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 β¨
π 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)
accessed: Saturday Jan 17 05:41:52 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 8.4.2 (GRASS 8.4.2) of the v.centroids(1) manual, and the source/version + date up top is what you're living in rn π«Ά go forth and centroid, you absolute icon πππΈ
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· 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