3

I was trying to correct the country shapefile of Uzbekistan for Gas flares:

Input layer (the UZB_adm1) differenced by this layer.

In QGIS the result was that the overlapping regions - where the differencing should have taken place - were gone. I presumed it was due to wrong referencing of the UZB shapefile. Couldn't resolve it somehow. After several desperate hours I went to gvSIG 2.2, did the differencing job there. And it worked like a charme. Has anyone an Idea what was wrong in QGIS?

  • As mentioned in the post, I don't think the problem was due to wrong referencing, just geometric errors. Perhaps you should remove that from your title? :) – Joseph Dec 11 '15 at 11:38
  • 1
    thanks a lot, that was a very thorough answer. title edited properly – Fitzroy Hogsflesh Dec 11 '15 at 12:10
3

If you run a tool where the results are not what you expected, a good test is to use the Check Geometry Validity from Vector > Geometry Tools > Check Geometry Validity. I ran this for your Gas Flares shapefile and it returned a couple of intersection errors:

Check Geometry Validity tool

To resolve this, you can use v.clean from the Processing Toolbox, select the cleaning tool snap and set the Threshold to 0.01:

v.clean with snap

In the Advanced parameters tab, you only need the Cleaned output so you can ignore the Errors one.

Now you should be able to use the Difference tool on your "UZB_adm1" layer with the "Cleaned" layer:

Difference

Result

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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