[GIS] How to clean vector segment intersect errors in GRASS

grassvector

I'm using GRASS to process a vector map.
When I export back to .SHP and do a 'Check Geometry Validity' in Quantum GIS it lists several errors of this type…

3,segments 199 and 203 of line 0 intersect at 129334.076193, 669460.784787

I've tried using v.clean to get rid of them with no effect. Can anyone give me some hints for the correct v.clean tool to use please?

Also is there a vector geometry checker in GRASS so I dont have to keep exporting back to shapefile to check for errors?

Here are the commands I run. The errors start appearing in 'pass2' The map is free of errors prior to import into GRASS (as far as the Quantum GIS checker is concerned at least).

v.in.ogr -o dsn=E:/geography/uk2/gb_pass0.shp output=pass0
v.clean input=pass0 output=pass1 --o tool=rmarea,rmdac,rmdupl,rmline thresh=100000
v.generalize input=pass1 output=pass2 --o method=chaiken threshold=100
v.generalize input=pass2 output=pass3 --o type=boundary method=reduction threshold=100 -r
v.generalize input=pass3 output=pass4 --o type=boundary method=douglas threshold=40 -r
v.clean input=pass4 output=pass5 --o tool=prune thresh=40
v.clean input=pass5 output=pass6 --o type=area tool=rmarea thresh=7000000
v.clean input=pass6 output=pass7 --o tool=rmdangle,break,rmdupl thresh=1000
v.clean input=pass7 output=pass8 --o tool=rmbridge,rmsa,rmdac,bpol,rmdupl
v.clean input=pass8 output=pass9 --o tool=break,rmdupl,rmline
v.centroids input=pass9 output=pass10 --o
v.out.ogr input=pass10@mapset1 type=area layer=1 format=ESRI_Shapefile dsn=E:/geography/uk2/gb_boundary olayer=gb_boundary -e

Best Answer

There have been fixes for v.generalize in GRASS GIS 6.4.1 but I am not sure if that would help in your case. If you can, please install latest winGRASS 6.4.svn and try.

If it still fails, we would appreciate a bug report with a reproducible example. In this forum, bug reports get rather lost.

Related Question