[GRASS-SVN] r73782 - grass/trunk/vector/v.split

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 9 09:31:10 PST 2018


Author: neteler
Date: 2018-12-09 09:31:10 -0800 (Sun, 09 Dec 2018)
New Revision: 73782

Modified:
   grass/trunk/vector/v.split/v.split.html
Log:
v.split manual: segment length notes improved (contributed by Ken Mankoff)

Modified: grass/trunk/vector/v.split/v.split.html
===================================================================
--- grass/trunk/vector/v.split/v.split.html	2018-12-09 11:29:01 UTC (rev 73781)
+++ grass/trunk/vector/v.split/v.split.html	2018-12-09 17:31:10 UTC (rev 73782)
@@ -1,4 +1,4 @@
-<h2>DESCRIPTION</h2>
+co<h2>DESCRIPTION</h2>
 
 <em>v.split</em> splits vector lines into shorter segments using 
 a maximal distance between nodes. The resulting length of all segments
@@ -17,28 +17,36 @@
 
 <h3>Notes on segment length information</h3>
 
-When running <em>v.to.db</em> on a map produced by <em>v.split</em>, it
-will add length information for each segment in its respective attribute
-line, but since all the segments of the same original line share the
-same attribute table line, it only gets updated once.
+When running <em>v.to.db</em> on a map produced by <em>v.split</em>,
+<em>v.to.db</em> will add length information for each segment in its
+respective attribute line, but since all the segments of the same
+original line share the same attribute table line, it only gets
+updated once.
 
 <p>
 To obtain the length of each segment, the user will have to attribute
-different category values to all of them. The best is to do this on a
-separate layer, using <em>v.category</em>
+different category values to each of them. The best way to do this on
+a separate layer, using <em>v.category</em>
 
 <div class="code"><pre>
 v.category v_split op=add layer=2 output=v_split_2
 </pre></div>
 
-and then run above commands on the new layer 2:
+and then run the following commands on the new layer 2:
 
 <div class="code"><pre>
+v.db.addtable v_split_2 layer=2
 v.db.addcolumn map=v_split_2 column="length double precision" layer=2
 v.to.db map=v_split_2 type=line option=length columns=length units=meters layer=2
 </pre></div>
 
+To link the new segments in the new layer to the original segments, use:
 
+<div class="code"><pre>
+v.db.addcolumn map=v_split_2 layer=2 column="cat_1 int"
+v.to.db map=v_split_2 layer=2 option=query query_layer=1 query_column=cat columns=cat_1
+</pre></div>
+
 <h2>EXAMPLES</h2>
 
 The examples are based on the North Carolina sample data location.



More information about the grass-commit mailing list