v.net.centrality(1grass)
โจ v.net.centrality โจ
okay bestie, welcome to v.net.centrality, a GRASS User's Manual moment ๐ this one's from GRASS 8.5.0 and honestly? it's giving network-science main character energy ๐
๐ธ NAME ๐ธ
v.net.centrality โ computes degree, centrality, betweeness, closeness and eigenvector centrality measures in the network. no cap, it literally does all of that ๐
๐ KEYWORDS ๐
vector, network, centrality measures โจ
๐ฆ SYNOPSIS ๐ฆ
v.net.centrality
v.net.centrality --help
v.net.centrality [-ga] input=name [arc_layer=string]
[node_layer=string] output=name [cats=range] [where=sql_query]
[arc_column=name] [arc_backward_column=name] [node_column=string]
[degree=name] [closeness=name] [betweenness=name]
[eigenvector=name] [iterations=integer] [error=float]
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
๐ฉ Flags ๐ฉ
-gโ use geodesic calculation for longitude-latitude projects ๐ like, actual earth-curvature math, not vibes-aโ add points on nodes โจ--overwriteโ let your output files overwrite existing files (be brave, or be careful, your call bestie)--helpโ print the usage summary ๐ฌ--verboseโ verbose module output, aka it tells you everything ๐--quietโ quiet module output ๐คซ--uiโ force launching the GUI dialog ๐ฅ๏ธ
๐ Parameters ๐
input=name[required] โ name of input vector map. Or, plot twist, a data source for direct OGR accessarc_layer=stringโ arc layer. Vector features can have category values in different layers, and this number decides which layer to use. When you're doing direct OGR access, this is the layer name instead. Default:1node_layer=stringโ node layer. Same deal as above: different layers have different category values, this picks one. With direct OGR access, it's the layer name. Default:2output=name[required] โ name for output vector map ๐พcats=rangeโ category values. Example:1,3,7-9,13where=sql_queryโ WHERE conditions of SQL statement without the'where'keyword. Example:income < 1000 and population >= 10000arc_column=nameโ arc forward/both direction(s) cost column (number)arc_backward_column=nameโ arc backward direction cost column (number)node_column=stringโ node cost column (number)degree=nameโ name of the degree centrality columncloseness=nameโ name of the closeness centrality columnbetweenness=nameโ name of the betweenness centrality columneigenvector=nameโ name of the eigenvector centrality columniterations=integerโ maximum number of iterations to compute eigenvector centrality. Default:1000error=floatโ cumulative error tolerance for eigenvector centrality. Default:0.1
๐ DESCRIPTION ๐
v.net.centrality computes degree, closeness, betweenness and eigenvector centrality measures. that's it, that's the description, and it ate ๐ฅ
๐ NOTES ๐
so here's the tea bestie: the module computes all these centrality measures for every node and stashes them in the given columns of an attribute table, which it creates and links to the output map ๐ซถ for the actual description of these measures, go check the wikipedia article it mentions, iykyk.
if you don't give a column name for a measure, that measure just doesn't get computed. simple as that ๐
if the -a flag is set, points get added on nodes that don't have points. also, the points you actually compute output for can be specified with the cats, layer and where parameters. however โ and this is the important bit โ if any of those parameters is present, then the -a flag is ignored and no new points get added. periodt.
the betweenness measure is not normalised. to get normalised values (between 0 and 1), you gotta divide each number by N choose 2 = N*(N-1)/2, where N is the number of nodes in the connected component. do the math, bestie ๐งฎ
computation of the eigenvector measure stops when either the given number of iterations is reached, or the cumulative squared error between successive iterations is less than error. so it's like, it knows when to stop, iconic behaviour honestly โจ
๐ธ EXAMPLES ๐ธ
compute closeness and betweenness centrality measures for each node, and produce a map that contains not only the points already in the input map but a map with a point on every node ๐
v.net.centrality input=roads output=roads_cent closeness=closeness \
betweenness=betweenness -a
๐ฆ SEE ALSO ๐ฆ
v.net, v.generalize ๐
๐ AUTHORS ๐
- Daniel Bundala, Google Summer of Code 2009, Student
- Wolf Bergenheim, Mentor
โญ SOURCE CODE โญ
available at: v.net.centrality source code (history)
latest change: Friday May 09 14:33:40 2025 in commit: b356c7e108fcbeca77474c8e83ebec8f1e7b3e4a
main index | vector index | topics index | keywords index | graphical index | full index
ยฉ 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
and that's the whole page bestie!! ๐ this was the GRASS 8.5.0 v.net.centrality(1grass) manual, dated with its latest change on Friday May 09 14:33:40 2025, ยฉ 2003-2026 GRASS Development Team โ go compute some centrality, you 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