NAME
v.net.allpairs - Computes the shortest path between all pairs of nodes in the network.
KEYWORDS
vector, network, shortest path
SYNOPSIS
v.net.allpairs
v.net.allpairs help
v.net.allpairs [-ga] input=name output=name layer=string [cats=range] [where=sql_query] [afcolumn=name] [abcolumn=name] [--overwrite] [--verbose] [--quiet]
Flags:
- -g
- Use geodesic calculation for longitude-latitude locations
- -a
- Add points on nodes without points
- --overwrite
- Allow output files to overwrite existing files
- --verbose
- Verbose module output
- --quiet
- Quiet module output
Parameters:
- input=name
- Name of input vector map
- Data source for direct OGR access
- output=name
- Name for output vector map
- layer=string
- Layer number or name
- A single vector map can be connected to multiple database tables. This number determines which table to use. Layer name for direct OGR access.
- Default: 1
- cats=range
- Category values
- Example: 1,3,7-9,13
- where=sql_query
- WHERE conditions of SQL statement without 'where' keyword
- Example: income < 1000 and inhab >= 10000
- afcolumn=name
- Name of arc forward/both direction(s) cost column
- abcolumn=name
- Name of arc backward direction cost column
DESCRIPTION
v.net.allpairs computes the shortest path between each select node and all other nodes.
NOTES
An attribute table is created and linked to layer. The table contains three columns: cat, to_cat, cost. Each entry denotes the cost of the shortest path from cat to to_cat. If the cost is negative then no path exists. If points are specified by cats, layer or where parameters then the table is filled only for the selected points. In other words, cat columns contains only selected points but the distances are computed and updated for all other nodes.
If flag -a is set then new points are added on nodes without nodes. These points have the largest categorie. Precisely, category of each new point is larger than any of the old categories. If the flag is not set then no new points are created and hence the attribute table stores the costs only between the points already present in the input. Output consists of all points mentioned in either of the columns.
If abcolumn is not given then then the same costs are used for forward and backward arcs.
EXAMPLES
Find shortest path from each intersection with pedestrian crossing to every other point using SHAPE_LEN for the cost of traversing the arcs in both directions.
v.net.allpairs input=roads output=roads_pairs afcol=SHAPE_LEN where="crossing=1"
SEE ALSO
v.net.path,
v.net.distance
AUTHORS
Daniel Bundala, Google Summer of Code 2009, Student
Wolf Bergenheim, Mentor
Last changed: $Date: 2010-04-10 10:01:48 -0700 (Sat, 10 Apr 2010) $
Main index - vector index - Full index
© 2003-2011 GRASS Development Team