Rechercher une page de manuel

Chercher une autre page de manuel:

Langue: en

Version: 332923 (ubuntu - 24/10/10)

Section: 1 (Commandes utilisateur)

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


vector, geometry

SYNOPSIS help [-nvit] input=name output=name [type=string[,string,...]] [llayer=integer] [dmax=float] [--overwrite] [--verbose] [--quiet]



Write line nodes

Write line vertices

Interpolate points between line vertices

Do not create attribute table

Allow output files to overwrite existing files

Verbose module output

Quiet module output



Input vector map containing lines

Output vector map where points will be written

Feature type
Options: point,line,boundary,centroid,area
Default: point,line,boundary,centroid

Layer number
Line layer
Default: 1

Maximum distance between points in map units
Default: 100

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


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:

Points and centroids can be considered as "lines" with only one node. Consequently, the result of selecting point or centroid 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 'lcat' attribute in layer 2 of the output vector. All values for along are zero in the output vector, 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".
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.
If the type parameter is set to area, 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. The centroid is not converted to a point in the output vector for type=area.
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, 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.


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




Radim Blazek

Last changed: $Date: 2010-01-15 15:57:25 +0100 (ven, 15 gen 2010) $

Full index

© 2003-2010 GRASS Development Team

- Oh là là! dit Sam, blêmissant, puis passant à l'écarlate. M'y voilà
encore! Chaque fois que tu ouvres ta grande gueule, tu mets les pieds
dans le plat, me disait l'Ancien, et il avait bien raison. Ah pauvre
de moi!
-- J.R.R. Tolkien, "Les deux tours"