1v.to.points(1) Grass User's Manual v.to.points(1)
2
3
4
6 v.to.points - Create points along input lines in new vector with 2
7 layers.
8
10 vector, geometry
11
13 v.to.points
14 v.to.points help
15 v.to.points [-nvit] input=name output=name [type=string[,string,...]]
16 [llayer=integer] [dmax=float] [--overwrite] [--verbose] [--quiet]
17
18 Flags:
19 -n
20 Write line nodes
21
22 -v
23 Write line vertices
24
25 -i
26 Interpolate points between line vertices
27
28 -t
29 Do not create attribute table
30
31 --overwrite
32 Allow output files to overwrite existing files
33
34 --verbose
35 Verbose module output
36
37 --quiet
38 Quiet module output
39
40 Parameters:
41 input=name
42 Input vector map containing lines
43
44 output=name
45 Output vector map where points will be written
46
47 type=string[,string,...]
48 Type
49 Feature type(s)
50 Options: point,line,boundary,centroid,area
51 Default: point,line,boundary,centroid
52
53 llayer=integer
54 Layer number
55 Line layer
56 Default: 1
57
58 dmax=float
59 Maximum distance between points in map units
60 Default: 100
61
63 v.to.points creates points along input lines. The output is a vector
64 with 2 layers. Layer 1 holds the category and attributes of the input
65 lines; all points created along the same line have the same category,
66 equal to the category of that line. In layer 2 each point has it's
67 unique category; other attributes stored in layer 2 are lcat - the cat‐
68 egory of the input line and along - the distance from line's start.
69
71 The dmax parameter is the maximum limit but not an exact distance. To
72 place points with exact distance from the beginning of the vector line
73 the user should use v.segment.
74
75 The type parameter is used to control which input vector geometry types
76 to convert into points. Some caveats to consider about this parameter:
77
78 Points and centroids can be considered as "lines" with
79 only one node. Consequently, the result of selecting
80 point or centroid as the type parameter is that all
81 points/centroids get written into the output vector. The
82 original category numbers of the input points/centroids
83 get written to the 'lcat' attribute in layer 2 of the
84 output vector. All values for along are zero in the out‐
85 put vector, as only point geometry was used for input
86 (there is no linear distance to calculate along, as each
87 point/centroid is the start and end of its own "line".
88
89 Boundaries are treated as lines, with points getting
90 interpolated along the boundary perimeter according to
91 dmax. If two adjoining polygons share a topological
92 boundary, the boundary only gets converted to points
93 once.
94
95 If the type paramter is set to area, the boundary of each
96 area is converted to points regardless of whether or not
97 there is a topological boundary between adjacent areas.
98 In other words, the common boundary of two adjoining
99 areas, for example, gets converted to points twice. The
100 centroid is not converted to a point in the output vector
101 for type=area.
102 The -v flag is used to digitize points that fall on the line's vertices
103 only. dmax is ignored in this case.
104
105 If the -i flag is used in conjunction with the -v flag, v.to.points
106 will digitize points on the line vertices, as well as interpolate
107 points between line vertices using dmax as the maximum allowable spac‐
108 ing.
109
110 To get points created for the beginning, middle and end only, use the
111 -i switch and set dmax so that:
112
113 (length of input line / 2) <= dmax <= length of input line
114
115 So if dmax is between 0.5x and 1.0x the line length, you will always
116 get points created at exactly the beginning, middle and end of the
117 input line.
118
120 In this example, the 't_powerlines' vector lines map in the Spearfish 6
121 location is used to create points along the input lines:
122 v.to.points in=t_powerlines out=t_powerlines_points dmax=120
123 d.vect t_powerlines_points
124
125
127 v.segment, v.to.rast, v.to.db
128
130 Radim Blazek
131
132 Last changed: $Date: 2006-09-28 14:19:12 +0200 (Thu, 28 Sep 2006) $
133
134 Full index
135
136 © 2003-2008 GRASS Development Team
137
138
139
140GRASS 6.3.0 v.to.points(1)