NAME

v.rm.dangles - Remove lines of specified length from GRASS vector file. (GRASS Vector Program)

SYNOPSIS

v.rm.dangles
v.rm.dangles help
v.rm.dangles input=name output=name [maxlength=value]

DESCRIPTION

v.rm.dangles removes lines from a binary vector file (input) which have a length less than or equal to maxlength. The length is computed as sum(sqrt(x^2+y^2)) for the entire length of the line in the units of the map. Lines that have attached lines at BOTH ends are not removed, regardless of length. (Note that nodes that have more than 1 line attached show as red in v.digit. Nodes with a single line show as green.)

Specifying maxlength of less than or equal 0 (default is -1) disables length checking and only lines with attached lines at both ends are output. Note that the lines at the ends of a string of lines will be eliminated because they have 2 lines attached at one node (endpoint) and only 1 line attached at the other node. For example, 5 lines attached in a row would have the first and last line eliminated leaving 3 lines when using maxlength = -1. Running v.rm.dangles maxlength = -1 again would remove 2 more lines, leaving 1 line in this example.

See v.build.polylines for building single lines from multiple attached lines.

To remove small segments on the order of the map resolution (from a raster to vector conversion, for example) consider specifying maxlength to be slightly greater than sqrt(2) times the map resolution (assuming the Easting and Northing resolutions are the same).

The input file is NOT changed. The input file is coppied to the output file with appropriate lines removed.

This program is very simple. It copies header information to the new map file but does not copy catagory or attribute information.

Parameters:

input=name
Name of a binary vector file
output=name
Name given to binary vector output file.
maxlength=value
Threshold length for deleting lines. Default value is -1

SEE ALSO

v.build.polylines, v.clean, v.digit, v.prune, v.spag, v.support

AUTHOR

J.Soimasuo
Faculty of Forestry
University of Joensuu, Finland

Last changed: $Date$