I am using the Vector \ Geoprocessing \ Difference tool to get the resulting area when taking a) current ground disturbance away from b) historic total ground disturbance to give c) what has been cleaned up over the years. I have a maximum of 41,000 nodes in the larger file (b).

I've run the geometry validity checker and noted 4 duplicates. All else seems ok. However when I run the tool I get an invalid geometry error message and only get about 70% of the polygons I expect to get. The OGR log says for these says "Pointer 'hLayer' or 'hFeat', is NULL in 'OGR_L_CreateFeature'. I've done this in MapInfo with these polys with no issues (the files have been brought as .TAB's).

Are there any other tools / checkers to use? I would assume the Check Geometry Validity would pick up problems or is this limited?

I note a bug #9152 was logged last year for a similiar issue. How do I find out where this is at / status and what I can do about it? Thanks.

3 Answers 3


A FOSS solution is available. GRASS has a repair geometry tool.

Dirk is correct though if you have Arc then repair geometry.

v.clean is the GRASS approach.


OK. Have had a peak in Bug Reports and looks as though the status of the noted bug is open and will be sorted in future.

My current non-QGIS solution:

  • Export to ArcGIS (10.2) and run Repair Geometry on the .SHP
  • Use Symmetrical Difference tool on files.
  • Bring back into QGIS, update the area column with new polygon areas.
  • Run stats for total area. Looks ok.

Looks like I'll need to use Arc to clean any others I may encounter. I'd prefer to have an all-in one-shop if possible.

  • You have cleangeometry functions in QGIS, Grass or PostGIS Commented Sep 26, 2014 at 13:39

Late post but another tool you can use to look for errors is the plugin Topology Checker in QGIS which allows users to define rules for the plugin to scan vector layers with. Such rules include:

  • Must contain layer X
  • Must not have duplicates
  • Must not have gaps
  • Must not overlap
  • Must not have invalid geometries

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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