[GRASSweb-list]markus: web/grass51/tutorial examples.html,1.23,1.24 index.html,1.15,1.16 network.html,1.1,1.2

grass at intevation.de grass at intevation.de
Fri Apr 18 10:37:56 EDT 2003


Author: markus

Update of /grassrepository/web/grass51/tutorial
In directory doto:/tmp/cvs-serv30216

Modified Files:
	examples.html index.html network.html 
Log Message:
added first section of vector network tutor

Index: examples.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/examples.html,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- examples.html	3 Apr 2003 12:03:05 -0000	1.23
+++ examples.html	18 Apr 2003 14:37:54 -0000	1.24
@@ -81,6 +81,7 @@
 <ol>
 <li><a href="ex_basic.html">Basic examples</a>
 <li><a href="ex_complex.html">More complex examples</a>
+<li><a href="network.html">Vector network analysis</a> examples
 </ol>
 
 <!-- FOOTER -->

Index: index.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/index.html,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- index.html	28 Feb 2003 20:00:04 -0000	1.15
+++ index.html	18 Apr 2003 14:37:54 -0000	1.16
@@ -42,6 +42,7 @@
 <ul>
  <li><a href="ex_basic.html">Basic</a> examples
  <li><a href="ex_complex.html">Complex</a> examples
+ <li><a href="network.html">Vector network analysis</a> examples
 </ul>
 <li><a href="troubleshooting.html">Troubleshooting</a>
 <li><a href="links.html">Links</a>

Index: network.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/network.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- network.html	17 Apr 2003 13:17:41 -0000	1.1
+++ network.html	18 Apr 2003 14:37:54 -0000	1.2
@@ -40,7 +40,7 @@
 <hr>
 <a name="toc"></a>
 <ol>
-<li><a href="#vnetiso">v.net.iso</a>
+<li><a href="#vnetiso">Reachability of Schools: v.net.iso</a>
 <li><a href="#vnetalloc">v.net.alloc</a>
 <li><a href="#vnetsteiner">v.net.steiner</a>
 <li><a href="#vnetsalesman">v.net.salesman</a>
@@ -195,9 +195,89 @@
 d.what.vect streets_schools
 </div></pre>
 <P>
-v.net.iso: TODO
 
-Splits network to bands between cost isolines (direction from center).
+<h2>Connecting schools to street network</h2>
+
+Nodes must be on the lines network for vector analysis. To fulfill this
+request, we have to generate the connection between the schools and the
+street network by generating a connection map. This connection map (vector
+lines between the school locations and the nearest street) we will patch
+into the schools_streets map created above.
+<P>
+
+First we generate the connection map between schools and closest streets:
+
+<div class="code"><pre>
+v.distance.connect input1=schools input2=strassen output=streets_schools_connect
+d.erase
+d.vect strassen col=grey
+d.vect schools col=red
+d.vect streets_schools_connect col=blue
+</div></pre>
+<P>
+Then we merge these line connections into the schools_streets map (we have
+to snap nodes and break street lines at intersection of the connecting
+lines):
+
+<div class="code"><pre>
+v.patch in=streets_schools,streets_schools_connect out=schools_net
+
+#next will also remove the bridges... (new tool in v.clean needed to avoid that)
+v.clean in=schools_net out=schools_net_clean tool=svtlx,break thresh=1
+g.remove vect=schools_net
+
+d.erase
+d.vect schools_net_clean
+</div></pre>
+<P>
+
+Now the map containing schools and streets is prepared for network analysis.
+
+<h2>Vector network analysis: Reachability of selected schools</h2>
+
+First we want to see all streets and the categories (IDs) of the schools
+to select some of them:
+
+<div class="code"><pre>
+d.vect schools_net
+#show all schools with their cats:
+d.vect schools_net ty=point icon="basic/circle" size=5 col=blue
+d.vect schools_net ty=point disp=cat
+</div></pre>
+
+Now we want to know the reachability of the schools with cats 201, 204, 209.
+These cats are defined as 'ccats' in 'v.net.iso' (if you want to calculate
+for all schools, just use <tt>ccats=1-10000</tt> or similar):
+
+<div class="code"><pre>
+#next is very slow due to an unsolved bug in graphlib (therefore cache disabled):
+#We check for three schools as we give a ccats range:
+v.net.iso input=schools_net_clean output=schools_isoalloc ccats=200-210 costs=1000,2500,5000,10000
+</div></pre>
+
+This calculates the reachability map based on the vector length for 1km,
+2.5km, 5km and 10km. Another option were to use vector line attributes from
+a DBMS table which may contain velocity, street types etc.<br>
+Finally we look at the result:
+
+<div class="code"><pre>
+d.erase
+d.vect schools_isoalloc
+d.vect schools_isoalloc col=green  cats=1
+d.vect schools_isoalloc col=yellow cats=2
+d.vect schools_isoalloc col=orange cats=3
+d.vect schools_isoalloc col=red    cats=4
+#show the schools as well:
+d.vect schools disp=attr attr=poiName bcolor=black cat=200-210
+d.vect schools_net ty=point cat=200-210 col=red icon="basic/circle" size=5
+d.grid -g s=1000
+d.barscale -t bc=white tc=black at=60,5
+</div></pre>
+<P>
+
+City of Osnabr&uuml;ck - reachability of selected schools (click to
+enlarge): <br>
+<a href=images/v.net.iso.schools.png><DEFANGED_IMG src=images/v.net.iso.schools_small.jpg alt="City of Osnabr&uuml;ck - reachability of selected schools"></a>
 
 <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