|
@@ -9,36 +9,42 @@ parameter.
|
|
|
|
|
|
The examples are based on the North Carolina sample data location.
|
|
|
|
|
|
-<h3>Example 1: Inserting nodes to railroad map</h3>
|
|
|
+<h3>Example 1: Inserting nodes to railroad lines map</h3>
|
|
|
|
|
|
<div class="code"><pre>
|
|
|
-# extract data for this example
|
|
|
-v.extract railroads out=myrr cats=1
|
|
|
+# extract one railroad line for this example
|
|
|
+v.extract input=railroads output=myrr cats=1
|
|
|
|
|
|
# show line, category, direction (to find the beginning)
|
|
|
-d.vect myrr disp=shape,cat,dir
|
|
|
+g.region vector=myrr
|
|
|
+d.erase
|
|
|
+d.vect myrr display=shape,cat,dir
|
|
|
|
|
|
# insert nodes at a distance not longer than 1000m
|
|
|
-v.split myrr out=mrr_split length=1000
|
|
|
-d.vect myrr_split disp=shape,topo
|
|
|
+v.split input=myrr output=myrr_split_1km length=1000
|
|
|
+
|
|
|
+d.vect myrr_split_1km display=shape,topo
|
|
|
</pre></div>
|
|
|
|
|
|
-Note: In case the data is not a polyline, build polylines in second step, eg.:
|
|
|
+<p>
|
|
|
+Note: In case that the vector line data are not polylines,
|
|
|
+generate first polylines as the second step, eg.:
|
|
|
|
|
|
<div class="code"><pre>
|
|
|
# join segments into polyline
|
|
|
-v.build.polylines myrr out=myrr_poly
|
|
|
-v.category myrr_pol out=myrailroads option=add
|
|
|
+v.build.polylines input=myrr output=myrr_polylines
|
|
|
+# regenerate categories
|
|
|
+v.category input=myrr_polylines output=myrailroads option=add
|
|
|
</pre></div>
|
|
|
|
|
|
-<h3>Example 2: Inserting vertices to railroad map</h3>
|
|
|
+<h3>Example 2: Inserting vertices to railroad lines map</h3>
|
|
|
|
|
|
Note: first run the two steps from example 1.
|
|
|
|
|
|
<div class="code"><pre>
|
|
|
# insert vertices at a distance not longer than 1000m
|
|
|
-v.split -n myrr out=myrr_split length=1000
|
|
|
-d.vect myrr_split disp=shape,topo
|
|
|
+v.split -n input=myrr output=myrr_split length=1000
|
|
|
+d.vect myrr_split display=shape,topo
|
|
|
</pre></div>
|
|
|
|
|
|
|