v.net.components(1grass) | Grass User's Manual | v.net.components(1grass) |
v.net.components - Computes strongly and weakly connected components in the network.
vector, network, components
v.net.components
v.net.components --help
v.net.components [-a] input=name
[arc_layer=string] [node_layer=string]
[arc_column=name] [arc_backward_column=name]
[node_column=string] output=name
method=string [--overwrite] [--help]
[--verbose] [--quiet] [--ui]
v.net.components computes the weakly and strongly connected components in a network.
Two nodes, u and v are in the same strongly connected component if there are directed paths from u to v and from v to u. The nodes are in the same weakly connected component if, ignoring edge directions, there is a path between them.
The type of components is specified by method parameter. v.net.components creates a table and links it to layer 1. This table contains only two integer columns: cat and comp. If a point or both endpoints of a line belong to the same component then the point/line is written to the output map and appropriate information is stored in the table. If -a flag is set then new points are added on the nodes without points. These points have category numbers larger than any category used in the input map.
One-way roads can be defined by assigning a cost of -1 to the appropriate cost column (arc_column or arc_backward_column). This affects only strongly connected components. Network nodes can be closed by assigning a cost of -1 to the node cost column. All nodes with a cost < 0 can not be traversed and are end points, while all nodes with a cost ≥ 0 can be traversed. This affects both weakly and strongly connected components.
Any road network should form a single strongly connected
component. Otherwise, it is impossible to travel between some places.
v.net.components input=roads output=roads_components method=strong
v.net, v.category,
Daniel Bundala, Google Summer of Code 2009, Student
Wolf Bergenheim, Mentor
Markus Metz
Last changed: $Date: 2017-11-02 11:53:40 +0100 (Thu, 02 Nov 2017) $
Available at: v.net.components source code (history)
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
© 2003-2019 GRASS Development Team, GRASS GIS 7.6.0 Reference Manual
GRASS 7.6.0 |