v.split.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <h2>DESCRIPTION</h2>
  2. <em>v.split</em> splits vector lines into shorter segments using
  3. a maximal distance between nodes. The resulting length of all segments
  4. is expected to be equal and not higher than the given <b>length</b>
  5. parameter.
  6. <h2>EXAMPLES</h2>
  7. The examples are based on the North Carolina sample data location.
  8. <h3>Example 1: Inserting nodes to railroad lines map</h3>
  9. <div class="code"><pre>
  10. # extract one railroad line for this example
  11. v.extract input=railroads output=myrr cats=1
  12. # show line, category, direction (to find the beginning)
  13. g.region vector=myrr
  14. d.erase
  15. d.vect myrr display=shape,cat,dir
  16. # insert nodes at a distance not longer than 1000m
  17. v.split input=myrr output=myrr_split_1km length=1000
  18. d.vect myrr_split_1km display=shape,topo
  19. </pre></div>
  20. <p>
  21. Note: In case that the vector line data are not polylines,
  22. generate first polylines as the second step, eg.:
  23. <div class="code"><pre>
  24. # join segments into polyline
  25. v.build.polylines input=myrr output=myrr_polylines
  26. # regenerate categories
  27. v.category input=myrr_polylines output=myrailroads option=add
  28. </pre></div>
  29. <h3>Example 2: Inserting vertices to railroad lines map</h3>
  30. Note: first run the two steps from example 1.
  31. <div class="code"><pre>
  32. # insert vertices at a distance not longer than 1000m
  33. v.split -n input=myrr output=myrr_split length=1000
  34. d.vect myrr_split display=shape,topo
  35. </pre></div>
  36. <h2>SEE ALSO</h2>
  37. <em>
  38. <a href="v.edit.html">v.edit</a>,
  39. <a href="v.build.polylines.html">v.build.polylines</a>,
  40. <a href="v.to.points.html">v.to.points</a>,
  41. <a href="v.segment.html">v.segment</a>
  42. </em>
  43. <h2>AUTHOR</h2>
  44. Radim Blazek
  45. <p><i>Last changed: $Date$</i>