[GRASS-SVN] r54807 - grass/branches/releasebranch_6_4/vector/v.net.distance
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 28 02:19:57 PST 2013
Author: mlennert
Date: 2013-01-28 02:19:57 -0800 (Mon, 28 Jan 2013)
New Revision: 54807
Modified:
grass/branches/releasebranch_6_4/vector/v.net.distance/description.html
Log:
Added note indicating that from and to nodes should be different (#1861)
Modified: grass/branches/releasebranch_6_4/vector/v.net.distance/description.html
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.net.distance/description.html 2013-01-28 10:12:23 UTC (rev 54806)
+++ grass/branches/releasebranch_6_4/vector/v.net.distance/description.html 2013-01-28 10:19:57 UTC (rev 54807)
@@ -6,6 +6,15 @@
These two sets are given by the respective <b>layer</b>, <b>where</b> and <b>cats</b> parameters. The type of <em>to</em> features is specified by <b>to_type</b> parameter and all <em>from</em> features are <em>points</em>. A table is linked to <b>output</b> map containing various information about the relation. More specifically, the table has three columns: <em>cat</em>, <em>tcat</em> and <em>dist</em> storing category of each <em>from</em> feature, category of the nearest <em>to</em> feature and the distance between them respectively. Furthemore, <b>output</b> map contains the shorest path between each <em>cat</em>, <em>tcat</em> pair. Each path consist of several lines. If a line is on the shorest path from a point then the category of this point is assigned to the line. Note that every line may contain more than one category value since single line may be on the shortest path for more than one <em>from</em> feature. And so the shortest paths can be easily obtained by qu
erying lines with corresponding category number.<br>
The costs of arcs in forward and backward direction are specified by <b>afcolumn</b> and <b>abcolumn</b> columns respectively. If <b>abcolumn</b> is not given, the same cost is used in both directions.
+<p>
+<em>v.net.distance</em> will not work if you are trying to find the nearest
+neighbors within a group of nodes, i.e. where <em>to</em> and <em>from</em>
+are the same set of nodes, as the closest node will be the node itself and
+the result will be zero-length paths. In order to find nearest neighbors
+within a group of nodes, you can either loop through each node as <em>to</em>
+and all other nodes as <em>from</em> or create a complete distance matrix with
+<a href="v.net.allpairs.html">v.net.allpairs</a> and select the lowest non-zero
+distance for each node.
<h2>EXAMPLES</h2>
Find shortest path and distance from every school to the nearest hospital and show path from school number one.
More information about the grass-commit
mailing list