[GRASS-SVN] r51430 - grass/trunk/vector/v.net.allpairs
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Apr 13 14:52:38 EDT 2012
Author: mmetz
Date: 2012-04-13 11:52:38 -0700 (Fri, 13 Apr 2012)
New Revision: 51430
Modified:
grass/trunk/vector/v.net.allpairs/v.net.allpairs.html
Log:
update manual
Modified: grass/trunk/vector/v.net.allpairs/v.net.allpairs.html
===================================================================
--- grass/trunk/vector/v.net.allpairs/v.net.allpairs.html 2012-04-13 18:52:07 UTC (rev 51429)
+++ grass/trunk/vector/v.net.allpairs/v.net.allpairs.html 2012-04-13 18:52:38 UTC (rev 51430)
@@ -22,16 +22,35 @@
If <b>abcolumn</b> is not given then then the same costs are used for
forward and backward arcs.
-<h2>EXAMPLES</h2>
+<h2>EXAMPLE</h2>
-Find shortest path from each intersection with pedestrian crossing to
-every other point using <em>SHAPE_LEN</em> for the cost of traversing
-the arcs in both directions.
+Find shortest path along roads from selected archsites (Spearfish sample
+dataset):
<div class="code"><pre>
-v.net.allpairs input=roads output=roads_pairs afcol=SHAPE_LEN where="crossing=1"
+# prepare network: connect archsites to roads with threshold 200
+v.net input=roads at PERMANENT points=archsites at PERMANENT \
+output=roads_net operation=connect thresh=200
+
+# verify result
+v.category input=roads_net option=report
+
+# only lines should have a category in layer 1
+# only points should have a category in layer 2
+
+# shortest path between all points with categories 1 - 5 in layer 2
+v.net.allpairs input=roads_net cats=1-5 out=roads_net_all
+v.db.select roads_net_all
</pre></div>
-<p>
+Result in matrix form:
+<div class="code"><pre>
+from\to 1 3 4 5
+1 0 18820.386 17206.651 17373.274
+3 18820.386 0 1739.079 9040.575
+4 17206.651 1739.079 0 7426.84
+5 17373.274 9040.575 7426.84 0
+</pre></div>
+
<h2>SEE ALSO</h2>
<em>
More information about the grass-commit
mailing list