3
<em>v.net.allpairs</em> computes the shortest path between each selected
4
node and all other selected nodes. An attribute table is created and
5
linked to layer 1 of the output map. The table contains three columns:
6
<em>cat</em>, <em>to_cat</em>, <em>cost</em>. Each entry denotes the
7
cost of the shortest path from <em>cat</em> to <em>to_cat</em>. If the
8
cost is negative then no path exists. If points are specified by <b>cats,
9
layer</b> or <b>where</b> parameters then the table is filled only for
12
If <b>abcolumn</b> is not given then then the same costs are used for
13
forward and backward arcs.
15
Contrary to other v.net.* modules, <em>v.net.allpairs</em> does not
16
allow to use arcs and nodes from separate layers. This means that you
17
have to put both types of features into the same layer, but with
18
distinct category numbers in order to allow accessing specific nodes
19
only. See the example below.
24
If the <b>-a</b> flag is set then new points are added on nodes without
25
nodes. These points have the largest category. Precisely, the category
26
value of each new point is larger than any of the old categories. Note
27
that these new points are not included in the output table.
32
Find shortest path along roads between schools (North Carolina sample
34
<div class="code"><pre>
35
#check cat values in arcs layer (streets_wake here):
36
v.category streets_wake op=report
38
#take the existing cat values of the points in schools_wake and add
39
50000 (because the cat values in streets_wake go up to just under 50000)
40
v.category schools_wake out=schools op=sum cat=50000
42
#now link the nodes with their new categories to the arcs, with node category values in layer 1
43
v.net streets_wake points=schools op=connect thresh=200 out=network
46
#then launch your analysis indicating the cat values of the points which you want to use
47
v.net.allpairs network cats=50000-50167 out=allpairs
56
<a href="v.net.path">v.net.path</a>,
57
<a href="v.net.distance">v.net.distance</a>
63
Daniel Bundala, Google Summer of Code 2009, Student<br>
64
Wolf Bergenheim, Mentor<br>
68
<i>Last changed: $Date: 2012-10-24 10:13:53 +0200 (Wed, 24 Oct 2012) $</i>