[GRASSweb-list]markus: web/grass51/tutorial ex_complex.html,1.5,1.6 network.html,1.5,1.6
grass at intevation.de
grass at intevation.de
Tue May 27 05:43:06 EDT 2003
Author: markus
Update of /grassrepository/web/grass51/tutorial
In directory doto:/tmp/cvs-serv13778
Modified Files:
ex_complex.html network.html
Log Message:
some cleanup
Index: ex_complex.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/ex_complex.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ex_complex.html 22 Apr 2003 11:27:00 -0000 1.5
+++ ex_complex.html 27 May 2003 09:43:04 -0000 1.6
@@ -46,8 +46,6 @@
<ol>
<li><a href="#postgismapserver">Example: Writing the GRASS 5.0 Spearfish
'streams' map into PostGIS with MapServer access</a>
-<li><a href="#shortestpath">Example: shortest path vector networking with
- d.path</a>
<li><a href="#shape_conversion">Example: Conversion of SHAPE map to GRASS
5.1 vector map</a>
</ol>
@@ -245,68 +243,6 @@
Should work... As the 'streams' map does not have exciting attributes, you
may calculate the length of each vector, assign it to the attributes table
and enjoy the map queries.
-
-<p><table width="100%" cellpadding="3" border="0">
-<tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
-<a name="shortestpath"></a>
-Example: shortest path vector networking with d.path
-<DIV ALIGN=right><a href="#toc">[UP]</a></DIV>
-</b></big></font></td></tr></table>
-
-[for this exercise we use the Spearfish data set from the GRASS web site]
-<P>
-
-A module based on the DGLib vector network library is 'd.path' (see <a
-href="http://mpa.itc.it/radim/g51/d.path.jpg">screenshot</a> which
-calculates shortest path on a vector network map. Traveling costs may be
-either line lengths, or costs saved as attributes in a database table
-(supported are cost assignments for both arcs and nodes).
-
-<P> We want to use the 'roads' map of the Spearfish demo location (if
-needed, convert to 5.1 format with 'v.convert'). A simple example
-is to use the vector length as costs:
-
-<div class="code"><pre>
-d.vect roads
-d.path map=roads
-</pre></div>
-
-More realistic shortest path queries may consider the maximum speed
-according to the road type. If desired to use different traveling costs for
-the two directions of a road, forward and backward costs are read from two
-different table columns. In our example we simply assume the same costs
-(same table column) for both directions. Node that you have to hit a node
-with the mouse in the GRASS monitor to select start/end point when
-using d.path.
-
-As the column 'travelcost' is not yet present in the table 'road' we can use
-StarOffice or OpenOffice to add it (see <a href="attrib_storage.html#toc">here</a>).
-The we can continue and insert values according to the road type (be sure to
-quote strings when using for where statement):
-
-<div class="code"><pre>
-echo "select * from roads" | db.select
-</pre></div>
-... shows that the travelcost column is filled with 0.0. To assign
-new travel costs, we run:<br>
-
-<div class="code"><pre>
-echo "update roads set travelcost=5 where cat=1" | db.execute
-echo "update roads set travelcost=20 where cat=2" | db.execute
-echo "update roads set travelcost=40 where cat=3" | db.execute
-echo "update roads set travelcost=60 where cat=4" | db.execute
-echo "update roads set travelcost=80 where cat=5" | db.execute
-echo "select * from roads" | db.select
-</pre></div>
-
-Then we can run the 'd.path' with our assigned travel costs:
-<div class="code"><pre>
-d.path map=roads afcol=travelcost abcol=travelcost
-</pre></div>
-
-To see the forward directions of the vector lines, use the 'dir' for the
-'display' parameter in 'd.vect'. It will add small arrows indicating the
-forward directions when plotting the vector map.
<p><table width="100%" cellpadding="3" border="0">
<tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
Index: network.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/network.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- network.html 14 May 2003 10:08:47 -0000 1.5
+++ network.html 27 May 2003 09:43:04 -0000 1.6
@@ -40,11 +40,76 @@
<hr>
<a name="toc"></a>
<ol>
+<li><a href="#shortestpath">Example: shortest path vector networking with
+ d.path</a>
<li><a href="#vnetiso">Reachability of Schools: v.net.iso</a>
<li><a href="#vnetalloc">Creating subnets: v.net.alloc</a>
<li><a href="#vnetsteiner">v.net.steiner</a>
<li><a href="#vnetsalesman">v.net.salesman</a>
</ol>
+
+<p><table width="100%" cellpadding="3" border="0">
+<tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
+<a name="shortestpath"></a>
+Example: shortest path vector networking with d.path
+<DIV ALIGN=right><a href="#toc">[UP]</a></DIV>
+</b></big></font></td></tr></table>
+
+[for this exercise we use the Spearfish data set from the GRASS web site]
+<P>
+
+A module based on the DGLib vector network library is 'd.path' (see <a
+href="http://mpa.itc.it/radim/g51/d.path.jpg">screenshot</a> which
+calculates shortest path on a vector network map. Traveling costs may be
+either line lengths, or costs saved as attributes in a database table
+(supported are cost assignments for both arcs and nodes).
+
+<P> We want to use the 'roads' map of the Spearfish demo location (if
+needed, convert to 5.1 format with 'v.convert'). A simple example
+is to use the vector length as costs:
+
+<div class="code"><pre>
+d.vect roads
+d.path map=roads
+</pre></div>
+
+More realistic shortest path queries may consider the maximum speed
+according to the road type. If desired to use different traveling costs for
+the two directions of a road, forward and backward costs are read from two
+different table columns. In our example we simply assume the same costs
+(same table column) for both directions. Node that you have to hit a node
+with the mouse in the GRASS monitor to select start/end point when
+using d.path.
+
+As the column 'travelcost' is not yet present in the table 'road' we can use
+StarOffice or OpenOffice to add it (see <a href="attrib_storage.html#toc">here</a>).
+The we can continue and insert values according to the road type (be sure to
+quote strings when using for where statement):
+
+<div class="code"><pre>
+echo "select * from roads" | db.select
+</pre></div>
+... shows that the travelcost column is filled with 0.0. To assign
+new travel costs, we run:<br>
+
+<div class="code"><pre>
+echo "update roads set travelcost=5 where cat=1" | db.execute
+echo "update roads set travelcost=20 where cat=2" | db.execute
+echo "update roads set travelcost=40 where cat=3" | db.execute
+echo "update roads set travelcost=60 where cat=4" | db.execute
+echo "update roads set travelcost=80 where cat=5" | db.execute
+echo "select * from roads" | db.select
+</pre></div>
+
+Then we can run the 'd.path' with our assigned travel costs:
+<div class="code"><pre>
+d.path map=roads afcol=travelcost abcol=travelcost
+</pre></div>
+
+To see the forward directions of the vector lines, use the 'dir' for the
+'display' parameter in 'd.vect'. It will add small arrows indicating the
+forward directions when plotting the vector map.
+
<p><table width="100%" cellpadding="3" border="0">
<tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
More information about the grass-web
mailing list