Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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). -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
share|improve this question
Which GRASS version do you use? – markusN May 30 '11 at 16:28
@markusN Grass 6.4.0 (it came with QGIS v1.6.0). On windows7 64 bit. – spiderplant0 May 31 '11 at 14:05

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.

share|improve this answer
For the record, a bunch of more fixes for v.generalize have been backported now from GRASS 7 to GRASS 6.4.svn, they will be published in GRASS 6.4.2 (or grab again a recent SVN version). – markusN Jun 27 '11 at 20:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.