1v.to.points(1) Grass User's Manual v.to.points(1)
2
3
4
6 v.to.points - Creates points along input lines in new vector map with
7 2 layers.
8
10 vector, geometry, 3D, line, node, vertex, point
11
13 v.to.points
14 v.to.points --help
15 v.to.points [-iprt] input=name [layer=string]
16 [type=string[,string,...]] output=name [use=string] [dmax=float]
17 [--overwrite] [--help] [--verbose] [--quiet] [--ui]
18
19 Flags:
20 -i
21 Interpolate points between line vertices (only for use=vertex)
22
23 -p
24 Use dmax as percentage of line length
25
26 -r
27 Start from the end node
28
29 -t
30 Do not create attribute table
31
32 --overwrite
33 Allow output files to overwrite existing files
34
35 --help
36 Print usage summary
37
38 --verbose
39 Verbose module output
40
41 --quiet
42 Quiet module output
43
44 --ui
45 Force launching GUI dialog
46
47 Parameters:
48 input=name [required]
49 Name of input vector map
50 Or data source for direct OGR access
51
52 layer=string
53 Line layer number or name
54 Vector features can have category values in different layers. This
55 number determines which layer to use. When used with direct OGR
56 access this is the layer name.
57 Default: 1
58
59 type=string[,string,...]
60 Input feature type
61 Options: point, line, boundary, centroid, area, face, kernel
62 Default: point,line,boundary,centroid,face
63
64 output=name [required]
65 Name for output vector map
66
67 use=string
68 Use line nodes or vertices only
69 Options: node, vertex
70
71 dmax=float
72 Maximum distance between points in map units or percentage with -p
73 Default: 100
74
76 v.to.points creates points along input 2D or 3D lines, boundaries and
77 faces. Point features including centroids and kernels are copied from
78 input vector map to the output. For details see notes about type param‐
79 eter.
80
81 The output is a vector map with 2 layers. Layer 1 holds the category of
82 the input features; all points created along the same line have the
83 same category, equal to the category of that line. In layer 2 each
84 point has its unique category; other attributes stored in layer 2 are
85 lcat - the category of the input line and along - the distance from
86 line’s start.
87
88 By default only features with category are processed, see layer parame‐
89 ter for details.
90
92 The dmax parameter is the maximum limit but not an exact distance. To
93 place points with exact distance from the beginning of the vector line
94 the user should use v.segment.
95
96 Set layer to -1 to process features from all layers including features
97 without category. Features will be assigned new unique categories at
98 layer 1. Option layer=-1 should be used to convert boundaries, as in
99 most of cases boundaries lack category values.
100
101 The type parameter is used to control which input vector geometry types
102 to convert into points. Some caveats to consider about this parameter:
103
104 · Points and centroids can be considered as "lines" with only one
105 node. Consequently, the result of selecting point or centroid
106 as the type parameter is that all points/centroids get written
107 into the output vector map. The original category numbers of
108 the input points/centroids get written to the ’lcat’ attribute
109 in layer 2 of the output vector map. All values for along are
110 zero in the output vector map, as only point geometry was used
111 for input (there is no linear distance to calculate along, as
112 each point/centroid is the start and end of its own "line").
113
114 · Boundaries are treated as lines, with points getting interpo‐
115 lated along the boundary perimeter according to dmax. If two
116 adjoining polygons share a topological boundary, the boundary
117 only gets converted to points once.
118
119 · If the type parameter is set to area, the boundary of each area
120 is converted to points regardless of whether or not there is a
121 topological boundary between adjacent areas. In other words,
122 the common boundary of two adjoining areas, for example, gets
123 converted to points twice. The centroid is not converted to a
124 point in the output vector for type=area.
125
126 The use=vertex option is used to digitize points that fall on the
127 line’s vertices only. Parameter dmax is ignored in this case. Similarly
128 to use=node when only line’s node are used.
129
130 If the -i flag is used in conjunction with the use=vertex option,
131 v.to.points will digitize points on the line vertices, as well as
132 interpolate points between line vertices using dmax as the maximum
133 allowable spacing.
134
135 Use the -p flag to treat dmax as a percentage of each line length. For
136 example, to get points created for the beginning, middle and end only,
137 use the -p flag and set dmax so that:
138 50 < dmax <= 100
139 Hence, if dmax is between 0.5x and 1.0x the line length, you will
140 always get points created at exactly the beginning, middle and end of
141 the input line.
142
143 Use the -r flag to create points starting from the end node.
144
146 In this example, the ’railroads’ vector lines map of the North Carolina
147 sample dataset is used to create points along the input lines:
148 # The North Carolina data are metric.
149 # 200m distance for nodes (maximum limit but not an exact distance)
150 v.to.points railroads output=railroads_nodes use=node dmax=200
151 # verify the two layers in the resulting map
152 v.category railroads_nodes option=report
153 # vector info
154 v.info railroads_nodes
155
157 v.segment, v.split, v.to.rast, v.to.db
158
160 Radim Blazek
161 Updated to GRASS 7 by Martin Landa, Czech Technical University in
162 Prague, Czech Republic
163
164 Last changed: $Date: 2017-02-16 06:09:41 +0100 (Thu, 16 Feb 2017) $
165
167 Available at: v.to.points source code (history)
168
169 Main index | Vector index | Topics index | Keywords index | Graphical
170 index | Full index
171
172 © 2003-2019 GRASS Development Team, GRASS GIS 7.4.4 Reference Manual
173
174
175
176GRASS 7.4.4 v.to.points(1)