1v.net.allpairs(1)             Grass User's Manual            v.net.allpairs(1)
2
3
4

NAME

6       v.net.allpairs  - Computes the shortest path between all pairs of nodes
7       in the network.
8

KEYWORDS

10       vector, network, shortest path
11

SYNOPSIS

13       v.net.allpairs
14       v.net.allpairs --help
15       v.net.allpairs   [-g]   input=name   output=name     [arc_layer=string]
16       [node_layer=string]     [cats=range]     [where=sql_query]    [arc_col‐
17       umn=name]        [arc_backward_column=name]        [node_column=string]
18       [--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]
19
20   Flags:
21       -g
22           Use geodesic calculation for longitude-latitude locations
23
24       --overwrite
25           Allow output files to overwrite existing files
26
27       --help
28           Print usage summary
29
30       --verbose
31           Verbose module output
32
33       --quiet
34           Quiet module output
35
36       --ui
37           Force launching GUI dialog
38
39   Parameters:
40       input=name [required]
41           Name of input vector map
42           Or data source for direct OGR access
43
44       output=name [required]
45           Name for output vector map
46
47       arc_layer=string
48           Arc layer
49           Vector  features can have category values in different layers. This
50           number determines which layer to use. When  used  with  direct  OGR
51           access this is the layer name.
52           Default: 1
53
54       node_layer=string
55           Node layer
56           Vector  features can have category values in different layers. This
57           number determines which layer to use. When  used  with  direct  OGR
58           access this is the layer name.
59           Default: 2
60
61       cats=range
62           Category values
63           Example: 1,3,7-9,13
64
65       where=sql_query
66           WHERE conditions of SQL statement without ’where’ keyword
67           Example: income < 1000 and population >= 10000
68
69       arc_column=name
70           Arc forward/both direction(s) cost column (number)
71
72       arc_backward_column=name
73           Arc backward direction cost column (number)
74
75       node_column=string
76           Node cost column (number)
77

DESCRIPTION

79       v.net.allpairs  computes  the  shortest path between each selected node
80       and all other selected nodes. The output is a vector with the  selected
81       nodes and the shortest paths.
82

NOTES

84       An  attribute table is created and linked to layer arc_layer. The table
85       contains four columns: cat, from_cat, to_cat,  cost.   Each  cat  entry
86       denotes  the  category of the shortest path from the node with category
87       from_cat to the node with category to_cat. If points are  specified  by
88       cats,  layer  or where parameters then the table is filled only for the
89       selected points.
90       If arc_backward_column is not given then then the same costs  are  used
91       for forward and backward arcs.
92

EXAMPLE

94       Find  shortest path along roads from selected archsites (Spearfish sam‐
95       ple dataset):
96       # prepare network: connect archsites to roads with threshold 200
97       v.net input=roads@PERMANENT points=archsites@PERMANENT \
98       output=roads_net operation=connect thresh=200
99       # verify result
100       v.category input=roads_net option=report
101       # only lines should have a category in layer 1
102       # only points should have a category in layer 2
103       # shortest path between all points with categories 1 - 5 in layer 2
104       v.net.allpairs input=roads_net cats=1-5 out=roads_net_all
105       v.db.select roads_net_all
106       Result in matrix form:
107       from\to   1         3         4         5
108       1    0         18820.386 17206.651 17373.274
109       3    18820.386 0         1739.079  9040.575
110       4    17206.651 1739.079  0         7426.84
111       5    17373.274 9040.575  7426.84        0
112

SEE ALSO

114        v.net.path, v.net.distance
115

AUTHORS

117       Daniel Bundala, Google Summer of Code 2009, Student
118       Wolf Bergenheim, Mentor
119       Markus Metz
120

SOURCE CODE

122       Available at: v.net.allpairs source code (history)
123
124       Main index | Vector index | Topics index | Keywords index  |  Graphical
125       index | Full index
126
127       © 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual
128
129
130
131GRASS 7.8.2                                                  v.net.allpairs(1)
Impressum