GRASS logo

NAME

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

KEYWORDS

vector, geometry

SYNOPSIS

v.to.points
v.to.points help
v.to.points [-nvit] input=name llayer=string [type=string[,string,...]] output=name [dmax=float] [--overwrite] [--verbose] [--quiet]

Flags:

-n
Write line nodes
-v
Write line vertices
-i
Interpolate points between line vertices
-t
Do not create attribute table
--overwrite
Allow output files to overwrite existing files
--verbose
Verbose module output
--quiet
Quiet module output

Parameters:

input=name
Name of vector map containing lines
Data source for direct OGR access
llayer=string
Line layer number or name
A single vector map can be connected to multiple database tables. This number determines which table to use. Layer name for direct OGR access.
Default: 1
type=string[,string,...]
Feature type
Options: point,line,boundary,centroid,area
Default: point,line,boundary,centroid
output=name
Name for output vector map where points will be written
dmax=float
Maximum distance between points in map units
Default: 100

DESCRIPTION

v.to.points 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 lcat - the category of the input line and along - the distance from line's start.

NOTES

The dmax 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.

The type parameter is used to control which input vector geometry types to convert into points. Some caveats to consider about this parameter:

The -v flag is used to digitize points that fall on the line's vertices only. dmax is ignored in this case.

If the -i flag is used in conjunction with the -v flag, 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.

To get points created for the beginning, middle and end only, use the -i switch and set dmax so that:

    (length of input line / 2) <= dmax <= length of input line

So 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.

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 Blazek

Last changed: $Date: 2010-01-15 00:14:33 -0800 (Fri, 15 Jan 2010) $


Main index - vector index - Full index

© 2003-2011 GRASS Development Team