Provided by: grass-doc_6.4.3-3_all

**NAME**

v.to.points- Create points along input lines in new vector with 2 layers.

**KEYWORDS**

vector, geometry

**SYNOPSIS**

v.to.pointsv.to.pointshelpv.to.points[-nvit]input=nameoutput=name[type=string[,string,...]] [llayer=integer] [dmax=float] [--overwrite] [--verbose] [--quiet]Flags:-nWrite line nodes-vWrite line vertices-iInterpolate points between line vertices-tDo not create attribute table--overwriteAllow output files to overwrite existing files--verboseVerbose module output--quietQuiet module outputParameters:input=nameInput vector map containing linesoutput=nameOutput vector map where points will be writtentype=string[,string,...] Feature type Options:point,line,boundary,centroid,areaDefault:point,line,boundary,centroidllayer=integerLayer number Line layer Default:1dmax=floatMaximum distance between points in map units Default:100

**DESCRIPTION**

v.to.pointscreates points along input lines. The output is a vector with 2 layers. Layer 1 holds the category and attributes of the input lines; all points created along the same line have the same category, equal to the category of that line. In layer 2 each point has it's unique category; other attributes stored in layer 2 arelcat- the category of the input line andalong- the distance from line's start.

**NOTES**

Thedmaxparameter is the maximum limit but not an exact distance. To place points with exact distance from the beginning of the vector line the user should use v.segment. Thetypeparameter is used to control which input vector geometry types to convert into points. Some caveats to consider about this parameter: Points and centroids can be considered as "lines" with only one node. Consequently, the result of selectingpointorcentroidas the type parameter is that all points/centroids get written into the output vector. The original category numbers of the input points/centroids get written to the 'lcat' attribute in layer 2 of the output vector. All values foralongare zero in the output vector, as only point geometry was used for input (there is no linear distance to calculatealong, as each point/centroid is the startandend of its own "line". Boundaries are treated as lines, with points getting interpolated along the boundary perimeter according todmax. If two adjoining polygons share a topological boundary, the boundary only gets converted to points once. If thetypeparameter is set toarea, the boundary of each area is converted to pointsregardlessof 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. The centroid is not converted to a point in the output vector fortype=area. The -v flag is used to digitize points that fall on the line's verticesonly.dmaxis ignored in this case. If the -i flag is used in conjunction with the -v flag,v.to.pointswill digitize points on the line vertices, as well as interpolate points between line vertices usingdmaxas the maximum allowable spacing. To get points created for the beginning, middle and end only, use the -i switch and setdmaxso that: (length of input line / 2) <=dmax<= length of input line So ifdmaxis 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.

**EXAMPLE**

In this example, the 't_powerlines' vector lines map in the Spearfish 6 location is used to create points along the input lines: v.to.points in=t_powerlines out=t_powerlines_points dmax=120 d.vect t_powerlines_points

**SEE** **ALSO**

v.segment,v.to.rast,v.to.db

**AUTHOR**

Radim BlazekLastchanged:$Date:2011-11-0803:29:50-0800(Tue,08Nov2011)$Full index © 2003-2013 GRASS Development Team