v.to.points.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <h2>DESCRIPTION</h2>
  2. <em>v.to.points</em> creates points along input lines. The output is a vector with 2 layers.
  3. Layer 1 holds the category and attributes of the input lines; all points created along the
  4. same line have the same category, equal to the category of that line. In layer 2 each point
  5. has it's unique category; other attributes stored in layer 2 are <em>lcat</em> - the
  6. category of the input line and <em>along</em> - the distance from line's start.
  7. <h2>NOTES</h2>
  8. The <em>dmax</em> parameter is the maximum limit but not an exact
  9. distance. To place points with exact distance from the beginning
  10. of the vector line the user should use
  11. <a HREF="v.segment.html">v.segment</a>.
  12. <p>
  13. The <em>type</em> parameter is used to control which input vector
  14. geometry types to convert into points.
  15. Some caveats to consider about this parameter:
  16. </p>
  17. <ul>
  18. <li>
  19. Points and centroids can be considered as "lines" with only one
  20. node. Consequently, the result of selecting <em>point</em> or
  21. <em>centroid</em> as the type parameter is that all points/centroids
  22. get written into the output vector. The original category numbers of
  23. the input points/centroids get written to the '<em><i>lcat</i></em>'
  24. attribute in layer 2 of the output vector. All values for
  25. <em>along</em> are zero in the output vector, as only point geometry
  26. was used for input (there is no linear distance to calculate
  27. <i>along</i>, as each point/centroid is the start <em><i>and</i></em>
  28. end of its own "line".</li>
  29. <li>
  30. Boundaries are treated as lines, with points getting interpolated
  31. along the boundary perimeter according to <em>dmax</em>. If two
  32. adjoining polygons share a topological boundary, the boundary only
  33. gets converted to points once.</li>
  34. <li>
  35. If the <em>type</em> parameter is set to <em>area</em>, the boundary of
  36. each area is converted to points <i>regardless</i> of whether or not
  37. there is a topological boundary between adjacent areas. In other
  38. words, the common boundary of two adjoining areas, for example, gets
  39. converted to points twice. The centroid is not converted to a point in
  40. the output vector for <em>type=area</em>.</li>
  41. </ul>
  42. The -v flag is used to digitize points that fall on the line's vertices <em>only</em>.
  43. <em>dmax</em> is ignored in this case.
  44. <p>
  45. If the -i flag is used in conjunction with the -v flag,
  46. <em>v.to.points</em> will digitize points on the line vertices, as
  47. well as interpolate points between line vertices using <em>dmax</em>
  48. as the maximum allowable spacing.
  49. <p>
  50. To get points created for the beginning, middle and end only, use
  51. the -i switch and set <em>dmax</em> so that:
  52. <p>
  53. &nbsp;&nbsp;&nbsp; (length of input line / 2) &lt;= <em>dmax</em> &lt;= length of input line
  54. <p>
  55. So if <em>dmax</em> is between 0.5x and 1.0x the line length, you
  56. will always get points created at exactly the beginning, middle and
  57. end of the input line.
  58. <h2>EXAMPLE</h2>
  59. In this example, the 't_powerlines' vector lines map in the
  60. <a HREF="http://grass.itc.it/download/data6.php">Spearfish 6</a>
  61. location is used to create points along the input lines:
  62. <div class="code"><pre>
  63. v.to.points in=t_powerlines out=t_powerlines_points dmax=120
  64. d.vect t_powerlines_points
  65. </pre></div>
  66. <h2>SEE ALSO</h2>
  67. <em>
  68. <a HREF="v.segment.html">v.segment</a>,
  69. <a HREF="v.to.rast.html">v.to.rast</a>,
  70. <a HREF="v.to.db.html">v.to.db</a></em>
  71. <h2>AUTHOR</h2>
  72. Radim Blazek
  73. <p><i>Last changed: $Date$</i></p>