|
@@ -3,7 +3,8 @@
|
|
|
<em>v.net.path</em> determines least costly, e.g. shortest or fastest
|
|
|
path(s) on a vector network.
|
|
|
|
|
|
-<p>Costs may be either line lengths, or attributes saved in a database
|
|
|
+<p>
|
|
|
+Costs may be either line lengths, or attributes saved in a database
|
|
|
table. These attribute values are taken as costs of whole segments, not
|
|
|
as costs to traverse a length unit (e.g. meter) of the segment.
|
|
|
For example, if the speed limit is 100 km / h, the cost to traverse a
|
|
@@ -12,30 +13,41 @@ length / speed = 10 km / (100 km/h) = 0.1 h.
|
|
|
Supported are cost assignments for both arcs and nodes,
|
|
|
and also different costs for both directions of a vector line.
|
|
|
For areas, costs will be calculated along boundary lines.
|
|
|
-<p>The input vector needs to be prepared with <em>v.net operation=connect</em>
|
|
|
+<p>
|
|
|
+The input vector needs to be prepared with <em>v.net operation=connect</em>
|
|
|
in order to connect points representing center nodes to the network.
|
|
|
|
|
|
<p>Nodes and arcs can be closed using cost = -1.
|
|
|
<p>Least cost paths are written to the output vector map with an
|
|
|
attached attribute table.
|
|
|
-<p>Nodes can be piped into the program from file or from stdin. The
|
|
|
-syntax is as follows:
|
|
|
+<p>Nodes can be
|
|
|
+<ul>
|
|
|
+<li> piped into the program from file or from stdin, or
|
|
|
+<li> defined in the graphical user interface ("enter values interactively").
|
|
|
+</ul>
|
|
|
+
|
|
|
+The syntax is as follows:
|
|
|
<div class="code"><pre>
|
|
|
id start_point_category end_point_category
|
|
|
</pre></div>
|
|
|
|
|
|
+(Example: 1 1 2)
|
|
|
+<p>
|
|
|
or
|
|
|
|
|
|
<div class="code"><pre>
|
|
|
id start_point_x start_point_y end_point_x end_point_y
|
|
|
</pre></div>
|
|
|
|
|
|
-<p>Points specified by category must be exactly on network nodes, and the
|
|
|
+<p>
|
|
|
+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>.
|
|
|
-<p>When specifying coordinates, the next network node to a given coordinate
|
|
|
+<p>
|
|
|
+When specifying coordinates, the next network node to a given coordinate
|
|
|
pair is used.
|
|
|
|
|
|
-<p>The attribute table will contain the following attributes:
|
|
|
+<p>
|
|
|
+The attribute table will contain the following attributes:
|
|
|
|
|
|
<ul>
|
|
|
<li>cat - path unique category assigned by module</li>
|
|
@@ -47,7 +59,7 @@ pair is used.
|
|
|
<li> 0 - OK, path found</li>
|
|
|
<li> 1 - node is not reachable</li>
|
|
|
<li> 2 - point of given category does not exist</li>
|
|
|
- </ul></li>
|
|
|
+ </ul>
|
|
|
<li>cost - travelling costs (on the network, not to/from network)</li>
|
|
|
<li>fdist - the distance from first point to the network</li>
|
|
|
<li>tdist - the distance from the network to second point</li>
|
|
@@ -62,9 +74,9 @@ zero costs are assumed for nodes.
|
|
|
accurate results, the line length must be taken into account when
|
|
|
assigning costs as attributes. For example, to get the <b>fastest path</b>,
|
|
|
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 needed,
|
|
|
-the line length can be calculated and written to the attributes table
|
|
|
-by <em>v.to.db</em>.
|
|
|
+path can then be found by specifying <tt>afcol=length/max_speed</tt>. If not yet
|
|
|
+existing, the column containing the line length ("length") has to added to the
|
|
|
+attributes table using <em>v.to.db</em>.
|
|
|
|
|
|
<h2>EXAMPLE</h2>
|
|
|
|