|
@@ -16,7 +16,7 @@ Supported are cost assignments for both arcs and nodes,
|
|
and also different costs for both directions of a vector line.
|
|
and also different costs for both directions of a vector line.
|
|
For areas, costs will be calculated along boundary lines.
|
|
For areas, costs will be calculated along boundary lines.
|
|
<p>
|
|
<p>
|
|
-The input vector needs to be prepared with <em>v.net operation=connect</em>
|
|
|
|
|
|
+The input vector needs to be prepared with <tt>v.net operation=connect</tt>
|
|
in order to connect points representing center nodes to the network.
|
|
in order to connect points representing center nodes to the network.
|
|
|
|
|
|
<p>Nodes and arcs can be closed using cost = -1.
|
|
<p>Nodes and arcs can be closed using cost = -1.
|
|
@@ -43,7 +43,7 @@ id start_point_x start_point_y end_point_x end_point_y
|
|
|
|
|
|
<p>
|
|
<p>
|
|
Points specified by category must be exactly on network nodes, and the
|
|
Points specified by category must be exactly on network nodes, and the
|
|
-input vector map needs to be prepared with <em>v.net operation=connect</em>.
|
|
|
|
|
|
+input vector map needs to be prepared with <tt>v.net operation=connect</tt>.
|
|
<p>
|
|
<p>
|
|
When specifying coordinates, the next network node to a given coordinate
|
|
When specifying coordinates, the next network node to a given coordinate
|
|
pair is used.
|
|
pair is used.
|
|
@@ -69,14 +69,14 @@ The attribute table will contain the following attributes:
|
|
|
|
|
|
<h2>NOTES</h2>
|
|
<h2>NOTES</h2>
|
|
Nodes and arcs can be closed using cost = -1.
|
|
Nodes and arcs can be closed using cost = -1.
|
|
-<p>If the cost columns 'afcol', 'abcol' and 'ncol' are not
|
|
|
|
|
|
+<p>If the cost columns <b>arc_column</b>, <b>arc_backward_column</b> and <b>node_column</b> are not
|
|
specified, the length of network segments is measured and
|
|
specified, the length of network segments is measured and
|
|
zero costs are assumed for nodes.
|
|
zero costs are assumed for nodes.
|
|
<p>When using attributes, the length of segments is not used. To get
|
|
<p>When using attributes, the length of segments is not used. To get
|
|
accurate results, the line length must be taken into account when
|
|
accurate results, the line length must be taken into account when
|
|
-assigning costs as attributes. For example, to get the <b>fastest path</b>,
|
|
|
|
|
|
+assigning costs as attributes. For example, to get the <em>fastest path</em>,
|
|
the columns 'max_speed' and 'length' are required. The correct fastest
|
|
the columns 'max_speed' and 'length' are required. The correct fastest
|
|
-path can then be found by specifying <tt>afcol=length/max_speed</tt>. If not yet
|
|
|
|
|
|
+path can then be found by specifying <tt>arc_column=length/max_speed</tt>. If not yet
|
|
existing, the column containing the line length ("length") has to added to the
|
|
existing, the column containing the line length ("length") has to added to the
|
|
attributes table using <em>v.to.db</em>.
|
|
attributes table using <em>v.to.db</em>.
|
|
|
|
|
|
@@ -98,7 +98,7 @@ v.db.select startend
|
|
g.copy vect=roads,myroads
|
|
g.copy vect=roads,myroads
|
|
|
|
|
|
# create lines map connecting points to network
|
|
# create lines map connecting points to network
|
|
-v.net myroads points=startend out=myroads_net op=connect thresh=500 alayer=1 nlayer=2
|
|
|
|
|
|
+v.net myroads points=startend out=myroads_net op=connect thresh=500 arc_layer=1 node_layer=2
|
|
|
|
|
|
# set up costs
|
|
# set up costs
|
|
|
|
|
|
@@ -132,10 +132,10 @@ v.db.update myroads_net_time layer=3 col=bcost val="length / speed * 60"
|
|
# ... the 'start' and 'end' nodes have category number 1 and 2
|
|
# ... the 'start' and 'end' nodes have category number 1 and 2
|
|
|
|
|
|
# Shortest path: ID as first number, then cat1 and cat2
|
|
# Shortest path: ID as first number, then cat1 and cat2
|
|
-echo "1 1 2" | v.net.path myroads_net_time alayer=3 nlayer=2 out=mypath
|
|
|
|
|
|
+echo "1 1 2" | v.net.path myroads_net_time arc_layer=3 node_layer=2 out=mypath
|
|
|
|
|
|
# Fastest path: ID as first number, then cat1 and cat2
|
|
# Fastest path: ID as first number, then cat1 and cat2
|
|
-echo "1 1 2" | v.net.path myroads_net_time alayer=3 nlayer=2 afcol=cost abcol=bcost out=mypath_time
|
|
|
|
|
|
+echo "1 1 2" | v.net.path myroads_net_time arc_layer=3 node_layer=2 arc_column=cost arc_backward_column=bcost out=mypath_time
|
|
</pre></div>
|
|
</pre></div>
|
|
|
|
|
|
To display the result, run for example:
|
|
To display the result, run for example:
|