3
<em>v.net.allpairs</em> computes the shortest path between each selected
4
node and all other selected nodes. The output is a vector with the
5
selected nodes and the shortest paths.
9
An attribute table is created and linked to layer <em>arc_layer</em>. The
10
table contains four columns: <em>cat</em>, <em>from_cat</em>,
11
<em>to_cat</em>, <em>cost</em>.
12
Each <em>cat</em> entry denotes the category of the shortest path from
13
the node with category <em>from_cat</em> to the node with category
14
<em>to_cat</em>. If points are specified by <b>cats, layer</b> or
15
<b>where</b> parameters then the table is filled only for the selected
18
If <b>arc_backward_column</b> is not given then then the same costs are used for
19
forward and backward arcs.
23
Find shortest path along roads from selected archsites (Spearfish sample
25
<div class="code"><pre>
26
# prepare network: connect archsites to roads with threshold 200
27
v.net input=roads@PERMANENT points=archsites@PERMANENT \
28
output=roads_net operation=connect thresh=200
31
v.category input=roads_net option=report
33
# only lines should have a category in layer 1
34
# only points should have a category in layer 2
36
# shortest path between all points with categories 1 - 5 in layer 2
37
v.net.allpairs input=roads_net cats=1-5 out=roads_net_all
38
v.db.select roads_net_all
41
Result in matrix form:
42
<div class="code"><pre>
44
1 0 18820.386 17206.651 17373.274
45
3 18820.386 0 1739.079 9040.575
46
4 17206.651 1739.079 0 7426.84
47
5 17373.274 9040.575 7426.84 0
53
<a href="v.net.path">v.net.path</a>,
54
<a href="v.net.distance">v.net.distance</a>
60
Daniel Bundala, Google Summer of Code 2009, Student<br>
61
Wolf Bergenheim, Mentor<br>
64
<p><i>Last changed: $Date: 2014-12-24 15:44:33 +0100 (Wed, 24 Dec 2014) $</i>