NAME
v.clean - Break lines at intersections.
SYNOPSIS
v.clean
v.clean help
v.clean [-b] input=string output=string [type=string[,string,...]] [err=string] tool=string[,string,...] [thresh=float[,float,...]]
Flags:
- -b
- Do not rebuild and store the topology at the end.
Parameters:
- input=string
- Name of input vector
- output=string
- Name of output vector
- type=string
- Select type: point, line, boundary, centroid or area
- Options: point,line,boundary,centroid,area
- Default: point,line,boundary,centroid,area
- err=string
- Name of output map where errors are written.
- tool=string
- Action to be done:
break - break lines at each intersection
rmdupl - remove duplicate lines (pay attention to categories!)
rmdangle - remove dangles, threshold ignored if < 0
chdangle - change the type of boundary dangle to line, threshold ignored if < 0, input line type is ignored
rmbridge - remove bridges connecting area and island or 2 islands
chbridge - change the type of bridges connecting area and island or 2 islands from boundary to line
snap - snap lines to vertex in threshold
rmdac - remove duplicate area centroids ('type' option ignored)
bpol - break (topologicaly clean) polygons (imported from non topological format (like shapefile). Boundaries are broken on each point shared between 2 and more polygons where angles of segments are different
- Options: break,rmdupl,rmdangle,chdangle,rmbridge,chbridge,snap,rmdac,bpol
- thresh=float
- Threshold in map units for each tool (default: 0.0).
DESCRIPTION
v.clean allows the user to automatically change (repair) vector files. Possible
tools are:
break
breaks lines and sets a node at each intersection
rmdupl
removes duplicate lines (pay attention to categories!)
snap
snaps vertex to a line and create new vertex at that line
rmdac
removes duplicate area centroids ('type' option ignored)
You do not have to run v.build afterwards.
What is a bridge?
A bridge is an area type connection of an island (polygon in a polygon) to the outer
polygon. This is topologically incorrect (but OGC Simple Features allow it). v.clean
can be used to optionally change the line type to fulfill the topology rules or to
remove the bridge from the map:
+-------------+ +-------------+ +-------------+
| P| P: polygon | P| | P|
| +---+ | I: island | +---+ | | +---+ |
| | I | | B: bridge | | I | | | | I | |
| | | | : line | | | | | | | |
| +-+-+ | | +---+ | | +-.-+ |
| | | | | | . |
| | B | | | | . L |
| | | | | | . |
+------+------+ +-------------+ +-------------+
EXAMPLE
v.clean input=testmap output=cleanmap tool=svtlx breakthresh=1
The import of areas with v.in.ogr requires a subsequent run of
v.clean to update the map to a topologically
valid structure (removal of duplicate collinear lines etc). The tools
used for that are 'rmdupl' and 'bpol':
v.clean input=areamap output=areamap_clean tool=rmdupl,bpol
AUTHOR
David Gerdes, U.S. Army Construction Engineering
Research Laboratory
Radim Blazek, ITC-Irst, Trento, Italy
Last changed: $Date: 2004/03/10 13:26:14 $
Help Index