[GRASS-SVN] r51429 - grass/branches/releasebranch_6_4/vector/v.net.allpairs

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Apr 13 14:52:07 EDT 2012


Author: mmetz
Date: 2012-04-13 11:52:07 -0700 (Fri, 13 Apr 2012)
New Revision: 51429

Modified:
   grass/branches/releasebranch_6_4/vector/v.net.allpairs/description.html
Log:
update manual

Modified: grass/branches/releasebranch_6_4/vector/v.net.allpairs/description.html
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.net.allpairs/description.html	2012-04-13 18:51:38 UTC (rev 51428)
+++ grass/branches/releasebranch_6_4/vector/v.net.allpairs/description.html	2012-04-13 18:52:07 UTC (rev 51429)
@@ -1,21 +1,60 @@
 <h2>DESCRIPTION</h2>
 
-<em>v.net.allpairs</em> computes the shortest path between each select node and all other nodes. 
+<em>v.net.allpairs</em> computes the shortest path between each selected 
+node and all other selected nodes.
+<p>
+<b><font color="red">WARNING:</font></b> This module is experimental 
+and will produce unexpected results if the input vector has been 
+prepared with <em>v.net</em>. A stable version is available in the next 
+version of GRASS (GRASS 7).
 
 <h2>NOTES</h2>
 
-An attribute table is created and linked to <b>layer</b>. The table contains three columns: <em>cat</em>, <em>to_cat</em>, <em>cost</em>. Each entry denotes the cost of the shortest path from <em>cat</em> to <em>to_cat</em>. If the cost is negative then no path exists. If points are specified by <b>cats, layer</b> or <b>where</b> parameters then the table is filled only for the selected points. In other words, <em>cat</em> columns contains only selected points but the distances are computed and updated for <em>all</em> other nodes.<br>
-If flag <b>-a</b> is set then new points are added on nodes without nodes. These points have the largest categorie. Precisely, category of each new point is larger than any of the old categories. If the flag is not set then no new points are created and hence the attribute table stores the costs only between the points already present in the input. Output consists of all points mentioned in either of the columns.<br>
-If <b>abcolumn</b> is not given then then the same costs are used for forward and backward arcs.
+An attribute table is created and linked to <b>layer</b>. The table 
+contains three columns: <em>cat</em>, <em>to_cat</em>, <em>cost</em>. 
+Each entry denotes the cost of the shortest path from <em>cat</em> to 
+<em>to_cat</em>. If the cost is negative then no path exists. If points 
+are specified by <b>cats, layer</b> or <b>where</b> parameters then 
+the table is filled only for the selected points. In other words, 
+<em>cat</em> columns contains only selected points but the distances 
+are computed and updated for <em>all</em> other nodes.<br> If flag 
+<b>-a</b> is set then new points are added on nodes without nodes. 
+These points have the largest categorie. Precisely, category of each 
+new point is larger than any of the old categories. If the flag is not 
+set then no new points are created and hence the attribute table 
+stores the costs only between the points already present in the input. 
+Output consists of all points mentioned in either of the columns.<br>
+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 layer=2 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>
 



More information about the grass-commit mailing list