[GRASSweb-list]markus: web/grass51/tutorial network.html,1.3,1.4
grass at intevation.de
grass at intevation.de
Thu Apr 24 12:43:53 EDT 2003
Author: markus
Update of /grassrepository/web/grass51/tutorial
In directory doto:/tmp/cvs-serv5349
Modified Files:
network.html
Log Message:
simple (dumb) v.net.alloc example added
Index: network.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/network.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- network.html 22 Apr 2003 11:27:00 -0000 1.3
+++ network.html 24 Apr 2003 16:43:51 -0000 1.4
@@ -41,7 +41,7 @@
<a name="toc"></a>
<ol>
<li><a href="#vnetiso">Reachability of Schools: v.net.iso</a>
-<li><a href="#vnetalloc">v.net.alloc</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>
@@ -225,9 +225,10 @@
#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
+g.rename vect=schools_net_clean,schools_net
d.erase
-d.vect schools_net_clean
+d.vect schools_net
</pre></div>
<P>
@@ -252,7 +253,7 @@
<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
+v.net.iso input=schools_net output=schools_iso ccats=200-210 costs=1000,2500,5000,10000
</pre></div>
This calculates the reachability map based on the vector length for 1km,
@@ -262,14 +263,21 @@
<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:
+
+#show all streets and schools:
+d.vect schools_net
+
+#show reachabilities as calculated above:
+d.vect schools_iso col=green cats=1
+d.vect schools_iso col=yellow cats=2
+d.vect schools_iso col=orange cats=3
+d.vect schools_iso col=red cats=4
+
+#highlight the selected schools:
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
+
+#nice frame etc:
d.grid -g s=1000
d.barscale -t bc=white tc=black at=60,5
</pre></div>
@@ -282,13 +290,48 @@
<p><table width="100%" cellpadding="3" border="0">
<tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
<a name="vnetalloc"></a>
-v.net.alloc
+Creating subnets: v.net.alloc
<DIV ALIGN=right><a href="#toc">[UP]</a></DIV>
</b></big></font></td></tr></table>
-Allocates subnets for nearest centers (direction from center).
+Allocates (creates) subnets for nearest centers (direction from center),
+e.g. zones of responsibility for distributed police stations.
-TODO
+<P>
+TODO better example (below is close to nonsense):<P>
+
+<div class="code"><pre>
+v.net.alloc input=schools_net output=schools_alloc ccats=200-210
+
+#check for present categories (school IDs)
+v.category schools_alloc option=print | sort -nu
+0
+201
+204
+209
+
+d.erase
+
+#show all streets and schools:
+d.vect schools_net
+
+#show reachabilities as calculated above:
+d.vect schools_alloc col=green cats=201
+d.vect schools_alloc col=yellow cats=204
+d.vect schools_alloc col=orange cats=209
+
+#highlight the selected schools:
+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
+
+#nice frame etc:
+d.grid -g s=1000lloc col=orange cats=209
+d.barscale -t bc=white tc=black at=60,5
+</pre></div>
+
+City of Osnabrück - patches of selected schools (click to
+enlarge): <br>
+<a href=images/v.net.alloc.schools.png><DEFANGED_IMG src=images/v.net.alloc.schools_small.jpg alt="City of Osnabrück - patched of selected schools"></a>
<p><table width="100%" cellpadding="3" border="0">
@@ -299,7 +342,7 @@
</b></big></font></td></tr></table>
Creates Steiner tree for the network and given terminals.
-
+<P>
TODO
<p><table width="100%" cellpadding="3" border="0">
@@ -310,7 +353,7 @@
</b></big></font></td></tr></table>
Creates a network cycle by connecting given nodes (Traveling salesman problem).
-
+<P>
TODO
<hr>
More information about the grass-web
mailing list