瀏覽代碼

v.split manual: added info on how to obtain segment length info (source: mlennert, https://lists.osgeo.org/pipermail/grass-user/2018-November/079761.html)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73781 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 6 年之前
父節點
當前提交
1ebb25c2be
共有 1 個文件被更改,包括 34 次插入0 次删除
  1. 34 0
      vector/v.split/v.split.html

+ 34 - 0
vector/v.split/v.split.html

@@ -5,6 +5,40 @@ a maximal distance between nodes. The resulting length of all segments
 is expected to be equal and not higher than the given <b>length</b> 
 parameter.
 
+<h2>NOTES</h2>
+
+<em>v.split</em> does not change the layer, nor the category information,
+nor the attribute table links of the original file. It just splits each
+line in segments and attributes the same category to all segments of the same
+original line. As the attribute table is linked to the features with
+their category as key, all segments originating from the same original
+line are linked to the same line in the original attribute table which
+is just copied to the new map.
+
+<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.
+
+<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>
+
+<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:
+
+<div class="code"><pre>
+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>
+
+
 <h2>EXAMPLES</h2>
 
 The examples are based on the North Carolina sample data location.