Vector topology cleaning
Cleaning large network datasets
Q: How can I speed up topologial cleaning () in GRASS 6 for large network datasets (for example OpenStreetMap data)?
A: The improvedversion in GRASS 7 is way faster. Here some hints though:
GRASS 6: When breaking lines it is recommended to
- split the lines first in smaller segments with using the vertices option. Then,
- run with 'tool=break'. After that,
- use to merge lines again.
GRASS 7: Here this has become much easier. Usewith the -c flag and 'tool=break' and 'type=line'. The 'rmdupl' tool is then automatically added, and the splitting and merging is done internally.
Cleaning patched polygons
Q: How can I patch to fitting area maps with have been digitized separately and correct the topology? I observe that the shared polygon boundaries do not perfectly match... I need to clean topology.
A: You can usefor this.
Tools to consider:
- the threshold (in map units) should be very small
v.in.ogr natural_earth/ne_110m_admin_0_countries.shp out=country_boundaries snap=0.0001 TODO: FIX THIS
Polygon import from SHAPE file
- In recent GRASS GIS versions, snapping thresholds for unclean polygons are suggested to the user when using v.in.ogr
- If the input polygons are supposed to not overlap each other, the number of centroids should be identical to the number of input polygons. If not the case, more topological cleaning is needed.
Q: How about self-intersecting lines and boundaries?
A: In the GRASS topological model self-intersecting lines are allowed, self-intersecting boundaries are not. Self-intersecting lines are ok e.g. formodules, e.g. to represent a bridge of a secondary road over a highway.
Note: There are some modules that do not like self-intersecting lines, e.g withproblems are expected.