[GRASS-SVN] r59248 - grass/trunk/vector/v.net.visibility

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Mar 13 14:07:14 PDT 2014


Author: neteler
Date: 2014-03-13 14:07:14 -0700 (Thu, 13 Mar 2014)
New Revision: 59248

Modified:
   grass/trunk/vector/v.net.visibility/v.net.visibility.html
Log:
v.net.visibility: wording and example improvment attempts

Modified: grass/trunk/vector/v.net.visibility/v.net.visibility.html
===================================================================
--- grass/trunk/vector/v.net.visibility/v.net.visibility.html	2014-03-13 20:57:04 UTC (rev 59247)
+++ grass/trunk/vector/v.net.visibility/v.net.visibility.html	2014-03-13 21:07:14 UTC (rev 59248)
@@ -3,12 +3,12 @@
 <em>v.net.visibility</em> computes the visibility graph of a vector
 map containing lines, areas (boundaries) and points. The visibility
 graph is the graph where the nodes are the end point of the lines,
-boundaries or simply the points. There is an edge between two nodes
-if they are 'visible'. Two nodes are visibible if there is no segments
-in between them, i.e. the edge doesn't intersect any line or boundary
-in the vector map. This is useful to compute the sortest path in a
+boundaries or simply points. There is an edge between two nodes if they
+are 'visible' to each other. Two nodes are visibible if there are no segments
+in between of them, i.e. the edge does not intersect any line or boundary
+in the vector map. This is useful to compute the shortest path in a
 vector map from any two points. To do this, first you need to compute
-the visibility graph and from it compute the shortest path using
+the visibility graph and from that to compute the shortest path using
 <em><a href="v.net.path.html">v.net.path</a></em>
 or <em><a href="d.path.html">d.path</a></em>.
 
@@ -19,9 +19,9 @@
 <h2>NOTES</h2>
 
 If you compute a shortest path after computing the visibility graph
-you will notice that this path might go through a vertix of a line. If
-this is not wanted you might to run the map
-through <em><a href="v.buffer.html">v.buffer</a></em> first whith a
+you will notice that this path might go through a vertex of a line. If
+this is not what you wanted you might need to process the map
+in <em><a href="v.buffer.html">v.buffer</a></em>, initially whith a
 small value. Example:
 
 <div class="code"><pre>
@@ -29,20 +29,20 @@
 </pre></div>
 
 <p>
-The first argument is the input map. It supports lines, boudaries 
-(so areas) and points. For the algorithm to work lines and 
-boundaries must not be intersecting (that includes overlapping).
+The first argument is the input map. It supports lines, boundaries 
+(so, areas) and points. For the algorithm  was written to work with lines
+and boundaries not intersecting each other (that includes overlapping).
 <br>
-The result map containing the visibility graph is given in the output map.
-
+The resulting map containing the visibility graph is given in the output map.
+<p>
 If you need to add additional points to compute a shortest path 
-between them afterwards you can use the <em>coordinate</em> parameter.
+between them afterwards you can use the <em>coordinate</em> parameter, e.g.:
 <div class="code"><pre>
 coordinate=25556200,6686400,25556400,6686600
 </pre></div>
 where 25556200,6686400 are the coordinate of the first point and 
 25556400,6686600 are the coordinates of the second point. Of course 
-you can give as many points as you want. They will be added to the 
+you can give as many points as you need. They will be added to the 
 visibility graph and edges from them will be computed. You can 
 always add those points after computing the visibility graph. Simply 
 use the <em>vis</em> parameter. The input will be the original 
@@ -57,15 +57,22 @@
 <h2>EXAMPLES</h2>
 
 <h3>Example 1</h3>
-A simple example showing how to use the module
+
+<!-- still overly complex result, some simple geometric were better -->
+A simple example (North Carolina sample data) showing how to use the module:
 <div class="code"><pre>
-v.net.visibility input=lines output=graph
+v.extract input=zipcodes_wake output=areas_7_11_25 cats=7,11,25
+g.region vect=zipcodes_wake
+d.mon wx0
+d.vect areas_7_11_25
+v.net.visibility input=areas_7_11_25 output=graph
 d.vect graph
-d.vect lines col=red
+d.vect areas_7_11_25 color=red type=boundary
 </pre></div>
 
-<h3>Example 2</h3>
-An example on how to use <em><a href="v.buffer.html">v.buffer</a></em> with the module 
+<h3>Example 2</h3>d.er  
+An example on how to use <em><a href="v.buffer.html">v.buffer</a></em>
+along with the module:
 <div class="code"><pre>
 v.buffer input=lines output=buffered_lines buffer=1
 v.net.visibility input=buffered_lines output=graph
@@ -76,7 +83,7 @@
 
 <h3>Example 3</h3>
 An example on how to use the coordinate parameter. This will compute the
-visibility graph of the vector map lines with the point 2555678,6686343
+visibility graph of the vector map lines with the point 2555678,6686343:
 <div class="code"><pre>
 v.net.visibility input=lines output=graph coordinate=2555678,6686343
 d.vect graph
@@ -84,18 +91,24 @@
 </pre></div>
 
 <h3>Example 4</h3>
-An example on how to use the coordinate parameter with the vis parameter.
+<!-- does not quite ork yet? -->
+An example (North Carolina sample data) on how to use the coordinate
+parameter with the vis parameter.
 Here the vector map graph is computed then a new visibility graph is computed
-from it with the point 2555678,6686343 extra
+from it with the point 669547.97,208348.20 extra:
 <div class="code"><pre>
-v.net.visibility input=lines output=graph
-d.vect graph
-d.vect lines col=red
-v.net.visibility input=lines vis=graph output=new_graph \
-      coordinate=2555678,6686343
+v.extract input=zipcodes_wake output=areas_7_11_25 cats=7,11,25
+g.region vect=zipcodes_wake
+d.mon wx0
+d.vect areas_7_11_25
+v.net.visibility input=zipcodes_wake output=graph
+v.net.visibility input=zipcodes_wake vis=graph output=new_graph \
+      coordinate=669547.97,208348.20
 d.erase
+d.vect areas_7_11_25
+echo "symbol basic/star 20 669547.97 208348.20 black red" | d.graph -m
 d.vect new_graph
-d.vect lines col=red
+d.vect areas_7_11_25 color=red type=boundary
 </pre></div>
 
 



More information about the grass-commit mailing list