[GRASS-SVN] r56769 - grass/branches/develbranch_6/misc/m.cogo

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 18 00:00:40 PDT 2013


Author: hamish
Date: 2013-06-18 00:00:39 -0700 (Tue, 18 Jun 2013)
New Revision: 56769

Modified:
   grass/branches/develbranch_6/misc/m.cogo/description.html
Log:
add an example of how to build the results into an area using the new -c flag (#1144, merge from trunk)

Modified: grass/branches/develbranch_6/misc/m.cogo/description.html
===================================================================
--- grass/branches/develbranch_6/misc/m.cogo/description.html	2013-06-18 06:52:54 UTC (rev 56768)
+++ grass/branches/develbranch_6/misc/m.cogo/description.html	2013-06-18 07:00:39 UTC (rev 56769)
@@ -43,7 +43,9 @@
 <p>
 Unless specified with the <b>coord</b> option, calculations begin from (0,0).
 
-<p>
+
+<h2>NOTES</h2>
+
 For those unfamiliar with the notation for bearings: Picture yourself in the
 center of a circle.  The first hemispere notation tell you whether you should
 face north or south.  Then you read the angle and either turn that many
@@ -51,7 +53,7 @@
 Finally, you move <distance> units in that direction to get to the 
 next station.
 
-
+<p>
 <em>m.cogo</em> can be run either non-interactively or
 interactively.  The program will be run non-interactively
 if the user specifies any parameter or flag. Use "m.cogo -",
@@ -60,9 +62,6 @@
 using the familiar GRASS parser interface.
 
 <p>
-
-<h2>NOTES</h2>
-
 This program is very simplistic, and will not handle deviations
 from the input format explained above.  Currently, the
 program doesn't do anything particularly useful with
@@ -70,9 +69,14 @@
 will be extended to provide the capability to generate
 vector and/or sites layers.
 
+<p>
+Lines may be closed by using the <b>-c</b> flag or snapped with
+<em>v.clean</em>, lines may be converted to boundaries with <em>v.type</em>,
+and closed boundaries may be converted to areas with <em>v.centroids</em>.
 
-<h2>EXAMPLE</h2>
 
+<h2>EXAMPLES</h2>
+
 <div class="code"><pre>
    m.cogo -l in=cogo.dat
 </pre></div>
@@ -99,18 +103,19 @@
 P016 S 88:44:56 W 18.7164
 </pre></div>
 
+<p>
 Round trip:
 <div class="code"><pre>
    m.cogo -l in=cogo.dat | m.cogo -rl in="-"
 </pre></div>
 
-
+<p>
 Import as a vector points map:
 <div class="code"><pre>
    m.cogo -l in=cogo.dat | v.in.ascii out=cogo_points x=1 y=2 fs=space
 </pre></div>
 
-
+<p>
 Shell script to import as a vector line map:
 <div class="code"><pre>
     m.cogo -l in=cogo.dat | tac | awk '
@@ -120,11 +125,21 @@
        v.in.ascii -n format=standard out=cogo_line
 </pre></div>
 
-Lines may be closed by using the <b>-c</b> flag or snapped with
-<em>v.clean</em>, lines may be converted to boundaries with <em>v.type</em>,
-and closed boundaries may be converted to areas with <em>v.centroids</em>.
+<p>
+Convert that lines map into an area:
+<div class="code"><pre>
+   # Add the -c flag to the above example to close the loop:
+   m.cogo -l -c in=cogo.dat | ...
+       ...
+   v.type input=cogo_line output=cogo_boundary type=line,boundary
+   v.centroids input=cogo_boundary output=cogo_area
+</pre></div>
 
+If necessary, snap the boundary closed with the <em>v.clean</em> module.
+Use <tt>tool=snap</tt> and <tt>thresh=0.0001</tt>, or some small value.
+<!-- does that need a cat number on the boundary to work? -->
 
+
 <h2>SEE ALSO</h2>
 
 <em>



More information about the grass-commit mailing list