[GRASSweb-list]markus: web/grass51/tutorial index.html,1.17,1.18 network.html,1.7,1.8
grass at intevation.de
grass at intevation.de
Wed Aug 13 12:06:12 EDT 2003
Author: markus
Update of /grassrepository/web/grass51/tutorial
In directory doto:/tmp/cvs-serv5355
Modified Files:
index.html network.html
Log Message:
v.net.steiner application written (connecting hospitals)
Index: index.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/index.html,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- index.html 31 May 2003 19:23:05 -0000 1.17
+++ index.html 13 Aug 2003 16:06:09 -0000 1.18
@@ -102,7 +102,7 @@
d.path</a>
<li><a href="network.html#vnetiso">Reachability of Schools: v.net.iso</a>
<li><a href="network.html#vnetalloc">Creating subnets: v.net.alloc</a>
- <li><a href="network.html#vnetsteiner">v.net.steiner</a>
+ <li><a href="network.html#vnetsteiner">v.net.steiner: optimized connection of nodes on a given vector network</a>
<li><a href="network.html#vnetsalesman">v.net.salesman</a>
</ol>
</ul>
Index: network.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/network.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- network.html 31 May 2003 19:23:05 -0000 1.7
+++ network.html 13 Aug 2003 16:06:09 -0000 1.8
@@ -106,7 +106,7 @@
<P>
We need a street map and a map of school locations.
-A nice, free vector data set is <a href="http://frida.intevation.de">FRIDA</a>,
+A nice, free vector data set is <a href="http://frida.intevation.de/index.en.html">FRIDA</a>,
the vector map of <b>Osnabrück</b>, a city in northern Germany.
Additionally you can download the
<a href="http://mpa.itc.it/markus/tutorial/asterdem30m.arc.gz">related ASTER
@@ -391,13 +391,89 @@
<p><table width="100%" cellpadding="3" border="0">
<tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
<a name="vnetsteiner"></a>
-v.net.steiner
+v.net.steiner: optimized connection of nodes on a given vector network
<DIV ALIGN=right><a href="#toc">[UP]</a></DIV>
</b></big></font></td></tr></table>
-Creates Steiner tree for the network and given terminals.
+Consider a number of hospitals in a city. Medical specialists are usually
+geographically distributed, and to improve the share of knowledge,
+applications in telemedicine shall be established. This requires broadband
+cable connection between the hospitals. As a constraint, to minimize the
+costs, the cables should follow the existing street network. The GIS task is
+to find the optimal cable distribution using the smallest amount of wire.
+This problem is known as "Minimum Steiner Tree" on a graph. In GRASS we can
+perform such network analysis as described in this section.
+
+<!-- http://www.cs.sunysb.edu/~algorith/files/steiner-tree.shtml -->
+
<P>
-TODO
+We use again the <a href="http://frida.intevation.de/index.en.html">City of Osnabrück vector
+data</a> as above for this fictitious project. First we extract the hospitals from the
+points of interest map:
+
+<div class="code"><pre>
+v.extract poi out=hospitals where="poiTypID=2"
+d.vect hospitals col=green
+d.vect strassen
+</pre></div>
+
+<P>
+We can see that the hospitals are not yet connected to the streets network,
+so we have to generate the connecting lines (using the nearest distance
+search, of course it were more realistic to digitize with 'v.digit' from
+a street map):
+
+<div class="code"><pre>
+v.distance -p from=hospitals to=strassen output=hospitals_conn_streets upload=dist column=dist
+d.vect hospitals col=yellow
+d.zoom
+d.vect hospitals_conn_streets col=red
+d.vect strassen
+</pre></div>
+
+<P>
+Patch together the hospital points map, the streets map and the map of
+connecting lines:
+
+<div class="code"><pre>
+v.patch in=hospitals,hospitals_conn_streets,strassen out=h_network
+#note that patch doesn't insert nodes where lines are connecting.
+#so we clean it (threshold of 1 millimeter):
+v.clean h_network out=h_network_clean tool=snap,break thresh=0.001
+
+#display patched map, with hospital points highlighted:
+d.vect h_network_clean
+d.vect h_network_clean ty=point col=red
+</pre></div>
+
+<P>
+Print the categories for the hospital points:
+<div class="code"><pre>
+v.category option=print input=h_network_clean type=point
+#the range is from 40-215
+</pre></div>
+
+<P>
+Calculate the Steiner tree for broadband cable connection network (slow at
+time to DGLib cache bug):
+<div class="code"><pre>
+v.net.steiner in=h_network_clean output=broadband_map afield=1 nfield=1 nsp=-1 tcats=40-300
+</pre></div>
+<P>
+
+Let's study the result:
+
+<div class="code"><pre>
+d.erase
+d.vect strassen
+d.vect hospitals col=yellow
+d.vect broadband_map col=red
+</pre></div>
+
+City of Osnabrück - optimal broadband connection of hospitals for
+telemedicine applications (click to enlarge): <br>
+<a href=images/v.net.steiner.hospitals.png><DEFANGED_IMG src=images/v.net.steiner.hospitals_small.png alt="City of Osnabrück - optimal broadband connection of hospitals"></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