~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to vector/v.net.allpairs/v.net.allpairs.html

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<h2>DESCRIPTION</h2>
 
2
 
 
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. 
 
6
 
 
7
<h2>NOTES</h2>
 
8
 
 
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 
 
16
points.
 
17
<br>
 
18
If <b>arc_backward_column</b> is not given then then the same costs are used for 
 
19
forward and backward arcs.
 
20
 
 
21
<h2>EXAMPLE</h2>
 
22
 
 
23
Find shortest path along roads from selected archsites (Spearfish sample 
 
24
dataset):
 
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
 
29
 
 
30
# verify result
 
31
v.category input=roads_net option=report
 
32
 
 
33
# only lines should have a category in layer 1
 
34
# only points should have a category in layer 2
 
35
 
 
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
 
39
</pre></div>
 
40
 
 
41
Result in matrix form:
 
42
<div class="code"><pre>
 
43
from\to 1               3               4               5
 
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
 
48
</pre></div>
 
49
 
 
50
<h2>SEE ALSO</h2>
 
51
 
 
52
<em>
 
53
<a href="v.net.path">v.net.path</a>,
 
54
<a href="v.net.distance">v.net.distance</a>
 
55
</em>
 
56
 
 
57
 
 
58
<h2>AUTHORS</h2>
 
59
 
 
60
Daniel Bundala, Google Summer of Code 2009, Student<br>
 
61
Wolf Bergenheim, Mentor<br>
 
62
Markus Metz
 
63
 
 
64
<p><i>Last changed: $Date: 2014-12-24 15:44:33 +0100 (Wed, 24 Dec 2014) $</i>