[GRASS-SVN] r54806 - grass/trunk/vector/v.net.distance

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 28 02:12:24 PST 2013


Author: mlennert
Date: 2013-01-28 02:12:23 -0800 (Mon, 28 Jan 2013)
New Revision: 54806

Modified:
   grass/trunk/vector/v.net.distance/v.net.distance.html
Log:
Added note indicating that from and to nodes should be different (#1861)


Modified: grass/trunk/vector/v.net.distance/v.net.distance.html
===================================================================
--- grass/trunk/vector/v.net.distance/v.net.distance.html	2013-01-28 10:12:09 UTC (rev 54805)
+++ grass/trunk/vector/v.net.distance/v.net.distance.html	2013-01-28 10:12:23 UTC (rev 54806)
@@ -24,6 +24,15 @@
 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 



More information about the grass-commit mailing list