.TH v.to.points 1grass "" "GRASS 6.4.2" "Grass User's Manual" .SH NAME \fI\fBv.to.points\fR\fR - Create points along input lines in new vector with 2 layers. .SH KEYWORDS vector, geometry .SH SYNOPSIS \fBv.to.points\fR .br \fBv.to.points help\fR .br \fBv.to.points\fR [-\fBnvit\fR] \fBinput\fR=\fIname\fR \fBoutput\fR=\fIname\fR [\fBtype\fR=\fIstring\fR[,\fIstring\fR,...]] [\fBllayer\fR=\fIinteger\fR] [\fBdmax\fR=\fIfloat\fR] [--\fBoverwrite\fR] [--\fBverbose\fR] [--\fBquiet\fR] .SS Flags: .IP "\fB-n\fR" 4m .br Write line nodes .IP "\fB-v\fR" 4m .br Write line vertices .IP "\fB-i\fR" 4m .br Interpolate points between line vertices .IP "\fB-t\fR" 4m .br Do not create attribute table .IP "\fB--overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB--verbose\fR" 4m .br Verbose module output .IP "\fB--quiet\fR" 4m .br Quiet module output .PP .SS Parameters: .IP "\fBinput\fR=\fIname\fR" 4m .br Input vector map containing lines .IP "\fBoutput\fR=\fIname\fR" 4m .br Output vector map where points will be written .IP "\fBtype\fR=\fIstring[,\fIstring\fR,...]\fR" 4m .br Feature type .br Options: \fIpoint,line,boundary,centroid,area\fR .br Default: \fIpoint,line,boundary,centroid\fR .IP "\fBllayer\fR=\fIinteger\fR" 4m .br Layer number .br Line layer .br Default: \fI1\fR .IP "\fBdmax\fR=\fIfloat\fR" 4m .br Maximum distance between points in map units .br Default: \fI100\fR .PP .SH DESCRIPTION \fIv.to.points\fR creates 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 are \fIlcat\fR - the category of the input line and \fIalong\fR - the distance from line's start. .SH NOTES The \fIdmax\fR parameter 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. .PP The \fItype\fR parameter is used to control which input vector geometry types to convert into points. Some caveats to consider about this parameter: .RS .IP Points and centroids can be considered as "lines" with only one node. Consequently, the result of selecting \fIpoint\fR or \fIcentroid\fR as 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 '\fI\fIlcat\fR\fR' attribute in layer 2 of the output vector. All values for \fIalong\fR are zero in the output vector, as only point geometry was used for input (there is no linear distance to calculate \fIalong\fR, as each point/centroid is the start \fI\fIand\fR\fR end of its own "line". .IP Boundaries are treated as lines, with points getting interpolated along the boundary perimeter according to \fIdmax\fR. If two adjoining polygons share a topological boundary, the boundary only gets converted to points once. .IP If the \fItype\fR parameter is set to \fIarea\fR, the boundary of each area is converted to points \fIregardless\fR 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. The centroid is not converted to a point in the output vector for \fItype=area\fR. .RE The -v flag is used to digitize points that fall on the line's vertices \fIonly\fR. \fIdmax\fR is ignored in this case. .PP If the -i flag is used in conjunction with the -v flag, \fIv.to.points\fR will digitize points on the line vertices, as well as interpolate points between line vertices using \fIdmax\fR as the maximum allowable spacing. .PP To get points created for the beginning, middle and end only, use the -i switch and set \fIdmax\fR so that: .PP (length of input line / 2) <= \fIdmax\fR <= length of input line .PP So if \fIdmax\fR 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. .SH EXAMPLE In this example, the 't_powerlines' vector lines map in the Spearfish 6 location is used to create points along the input lines: \fC .DS .br v.to.points in=t_powerlines out=t_powerlines_points dmax=120 .br d.vect t_powerlines_points .br .DE \fR .SH SEE ALSO \fI v.segment, v.to.rast, v.to.db \fR .SH AUTHOR Radim Blazek .PP \fILast changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $\fR .PP Full index .PP © 2003-2011 GRASS Development Team