v.net.spanningtree(1)
π v.net.spanningtree β the GRASS GIS User's Manual glow-up π
okay bestie, so this one is from the GRASS GIS User's Manual and it's called v.net.spanningtree and it's literally about finding the cheapest lil web of connections across your network. no cap. πΈοΈβ¨
KEYWORDS: vector, network, spanning tree
β¨ SYNOPSIS β¨
v.net.spanningtree
v.net.spanningtree --help
v.net.spanningtree [-g] input=name output=name [arc_layer=string]
[node_layer=string] [arc_column=name] [node_column=name]
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
π FLAGS π
-gβ use geodesic calculation for longitude-latitude projects π (so like, for lat-long vibes only)--overwriteβ allow output files to overwrite existing files (it's giving "yes, i MEANT to do that" π )--helpβ print usage summary--verboseβ verbose module output (she's chatty, we love her)--quietβ quiet module output (she's mysterious, we also love her)--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 maparc_layer=stringβ arc layer. so here's the tea: vector features can have category values in different layers, and this number determines which layer to use. when it's used with direct OGR access, this is the layer name instead. default:1node_layer=stringβ node layer. same situation fr fr: vector features can have category values in different layers, this number picks which layer, and with direct OGR access it's the layer name. default:2arc_column=nameβ arc forward/both direction(s) cost column (number)node_column=nameβ node cost column (number)
π« DESCRIPTION π«
v.net.spanningtree finds the minimum spanning tree in a network. that's it, that's the mission. main character energy. π
π₯ NOTES π₯
okay so let's actually break this down because it's lowkey iconic:
a spanning tree is a minimum cost subnetwork connecting all nodes in an undirected network β meaning same forward and backward costs, no picking favorites. βοΈ
if your network is disconnected, then the module computes the minimum spanning tree for each (weakly) connected component. so strictly speaking, v.net.spanningtree doesn't compute a spanning tree at all β it computes a spanning forest. yes bestie, the name is a lil misleading, we've all been there. π²π²π²
as the name suggests, a spanning tree is a tree. meaning: it contains no cycles, and if a component has N nodes then the tree has N-1 edges connecting all nodes. math ate that. β
Accol is used to specify the costs of the edges. the output consists of the edges in the spanning tree. periodt. π
π EXAMPLES π
find the cheapest set of pipelines connecting all nodes. slay.
v.net.spanningtree input=projected_pipelines output=spanningtree accol=cost
π¦ SEE ALSO π¦
v.netv.net.steiner
π AUTHORS π
- Daniel Bundala, Google Summer of Code 2009, Student
- Wolf Bergenheim, Mentor
π SOURCE CODE π
Available at: v.net.spanningtree source code (history)
Accessed: Saturday Jan 17 05:41:26 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, no notes, we ate and left no crumbs π β¨
so yeah, this was v.net.spanningtree(1) from GRASS 8.4.2 β go build a forest, not just a tree, iykyk π²π«Άπ
π¦ 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