v.net.spanningtree(1grass)

πŸ’– v.net.spanningtree πŸ’–

okay so bestie, this is v.net.spanningtree β€” straight out of the GRASS User's Manual ✨ and it's literally the girlboss of network graphs. she computes minimum spanning tree for the network. that's it, that's the whole job, and she does it flawlessly. periodt. πŸ’…


🌸 NAME 🌸

v.net.spanningtree β€” Computes minimum spanning tree for the network. πŸ‘‘


🏷️ 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. globe girlie behavior 🌍
  • --overwrite β€” Allow output files to overwrite existing files. she will absolutely replace your old file, no hesitation, no warning text πŸ’€
  • --help β€” Print usage summary. your lil cheat sheet 🫢
  • --verbose β€” Verbose module output. she tells you everything πŸ’¬
  • --quiet β€” Quiet module output. she says nothing and just delivers 🀫
  • --ui β€” Force launching GUI dialog. pop-up moment ✨

πŸ“ Parameters πŸ“

  • input=name [required] β€” Name of input vector map. Or data source for direct OGR access.
  • output=name [required] β€” Name for output vector map.
  • arc_layer=string β€” Arc layer. Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.

Default: 1

  • node_layer=string β€” Node layer. Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.

Default: 2

  • arc_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 the whole vibe check and she passed it. πŸ”₯


πŸ“ NOTES πŸ“

okay so listen up because this part is giving "actually important":

A spanning tree is a minimum cost subnetwork connecting all nodes in an undirected network (same forward and backward costs). 🧠

If a network is disconnected then the module computes the minimum spanning tree for each (weakly) connected component. So, strictly speaking, v.net.spanningtree does not compute spanning tree but a spanning forest. 🌲🌲🌲 not me exposing the naming crime 😭

As the name suggests, a spanning tree is a tree. That is, it contains no cycles and if a component has N nodes then the tree has N-1 edges connecting all nodes. no loops, no drama, just vibes πŸŽ€

accol is used to specify the costs of the edges. The output consists of the edges in the spanning tree. so what you get back = the edges themselves, bestie. πŸ’…


🌈 EXAMPLES 🌈

Find cheapest set of pipelines connecting all nodes. frugal queen behavior fr fr πŸ’Έ

v.net.spanningtree input=projected_pipelines output=spanningtree accol=cost

πŸ‘€ SEE ALSO πŸ‘€

  • v.net
  • v.net.steiner

πŸ‘‘ AUTHORS πŸ‘‘

  • Daniel Bundala, Google Summer of Code 2009, Student
  • Wolf Bergenheim, Mentor

πŸ’Ύ SOURCE CODE πŸ’Ύ

Available at: v.net.spanningtree source code (history)

Latest change: Friday Feb 07 19:16:09 2025 in commit: a82a39f673b97fafcfce1604dc3e6015cb96487a

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


and that's the whole page bestie, you ate it up, no notes 🫢✨

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual β€” she's literally in the GRASS 8.5.0 era and this manual was served fresh with love. mwah πŸ’‹πŸŒΈπŸŽ€

πŸ“¦ where this page comes from