v.to.points(1)
π v.to.points β the GRASS GIS User's Manual page, but make it a group chat π
okay bestie, so you know v.to.points? the manual calls it v.to.points and it lives in the GRASS GIS User's Manual. she's a vector module and her whole thing is: Creates points along input lines in new vector map with 2 layers. two layers!! she's giving overachiever π
β¨ KEYWORDS β¨
vector, geometry, 3D, line, node, vertex, point
likeβ¦ that's the whole vibe. geometry girlies rise π¦
πΈ SYNOPSIS πΈ
v.to.points
v.to.points --help
v.to.points [-iprt] input=name [layer=string]
[type=string[,string,...]] output=name [use=string] [dmax=float]
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
no cap, that's the whole shape of it.
π Flags π
-iβ Interpolate points between line vertices (only for use=vertex) β¨-pβ Use dmax as percentage of line length-rβ Start from the end node π-tβ Do not create attribute table π--overwriteβ Allow output files to overwrite existing files--helpβ Print usage summary--verboseβ Verbose module output--quietβ Quiet module output π€«--uiβ Force launching GUI dialog
π«Ά Parameters π«Ά
input=name[required] β Name of input vector map. Or data source for direct OGR access.layer=stringβ Line layer number or name. Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name. Default:1type=string[,string,...]β Input feature type. Options:point,line,boundary,centroid,area,face,kernel. Default:point,line,boundary,centroid,faceoutput=name[required] β Name for output vector mapuse=stringβ Use line nodes (start/end) or vertices only. Options:node,start,end,vertexdmax=floatβ Maximum distance between points in map units or percentage with-p. Default:100
π DESCRIPTION π
so v.to.points creates points along input 2D or 3D lines, boundaries and faces. literally what it says on the tin, bestie. and get this β point features including centroids and kernels are copied from the input vector map to the output. for the details you gotta go read the notes about the type parameter, it's a whole saga (scroll down, i got you).
the output is a vector map with 2 layers. this is the iconic part:
- Layer 1 holds the category of the input features; all points created along the same line have the same category, equal to the category of that line. so everyone on that line shares a category, it's giving found family π₯Ή
- Layer 2 β each point has its unique category; other attributes stored in layer 2 are
lcatβ the category of the input line β andalongβ the distance from line's start.
by default only features with category are processed, see the layer parameter for details. no category, no entry, sorry babe π«
π¦ NOTES π¦
the dmax parameter is the maximum limit but not an exact distance. it's giving "suggestion, not a promise" π. if you want points placed with exact distance from the beginning of the vector line, you should use v.segment.
set layer to -1 to process features from all layers including features without category. features will be assigned new unique categories at layer 1. and listen β option layer=-1 should be used to convert boundaries, because in most of cases boundaries lack category values. do it, trust.
the type parameter controls which input vector geometry types get converted into points. some caveats to consider about this parameter, and bestie there are three of them:
- Points and centroids can be considered as "lines" with only one node. consequently, the result of selecting
pointorcentroidas thetypeparameter is that all points/centroids get written into the output vector map. the original category numbers of the input points/centroids get written to the'lcat'attribute in layer 2 of the output vector map. all values foralongare zero in the output vector map, as only point geometry was used for input (there is no linear distance to calculate along, as each point/centroid is the start and end of its own "line"). a line of one. main character energy fr. - Boundaries are treated as lines, with points getting interpolated along the boundary perimeter according to
dmax. if two adjoining polygons share a topological boundary, the boundary only gets converted to points once. sharing is caring, they don't double-dip π«Ά - If the
typeparameter is set toarea, the boundary of each area is converted to points regardless of whether or not there is a topological boundary between adjacent areas. in other words, the common boundary of two adjoining areas, for example, gets converted to points twice. no sharing here, it's every area for herself π . and the centroid is not converted to a point in the output vector fortype=area.
the use=vertex option is used to digitize points that fall on the line's vertices only. parameter dmax is ignored in this case. similarly to use=node when only line's node are used. to filter only starting/ending nodes use use=start / use=end.
if the -i flag is used in conjunction with the use=vertex option, v.to.points will digitize points on the line vertices, as well as interpolate points between line vertices using dmax as the maximum allowable spacing. she does both. she contains multitudes β¨
use the -p flag to treat dmax as a percentage of each line length. for example, to get points created for the beginning, middle and end only, use the -p flag and set dmax so that:
50 < dmax <= 100
hence, if dmax is between 0.5x and 1.0x the line length, you will always get points created at exactly the beginning, middle and end of the input line. three points. iconic trio. no notes π
use the -r flag to create points starting from the end node. backwards walk, she's quirky π
π EXAMPLES π
Points along the input lines
in this example, the 'railroads' vector lines map of the North Carolina sample dataset is used to create points along the input lines:
# The North Carolina data are metric.
# 200m distance for points (maximum limit but not an exact distance)
v.to.points input=railroads output=railroads_points dmax=200
# verify the two layers in the resulting map
v.category input=railroads_points option=report
# vector info
v.info map=railroads_points
Extract nodes as points
v.to.points input=railroads output=railroads_nodes use=node
Extract starting/ending nodes as points
v.to.points input=railroads output=railroads_start use=start
v.to.points input=railroads output=railroads_end use=end
π SEE ALSO π
v.segment, v.split, v.to.rast, v.to.db
go read those too, they're her friends π«Ά
π AUTHORS π
Radim Blazek
Updated to GRASS 7 by Martin Landa, Czech Technical University in Prague, Czech Republic
π SOURCE CODE π
Available at: v.to.points source code (history)
Accessed: Saturday Jan 17 05:41:31 2026
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
ok that's the whole page, you ate that bestie π
and a lil sign-off because you deserve it: this whole thing is from GRASS 8.4.2 (the GRASS GIS 8.4.2 Reference Manual, no less), Β© 2003-2025 GRASS Development Team β and yeah, v.to.points(1) under GRASS 8.4.2, periodt. πΈβ¨π¦
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms