2

I'm using the Vector Geoprocessing/Difference Tool to cookie-cut out of one polygon using several polygons from another layer, but it is returning a blank layer. I note this query has been asked before and the problem can be that the layers have different CRS's. That is not the case here. I have uploaded a sample of the data set here:

https://www.dropbox.com/sh/rovtjvngrzow82z/AABG3yM9o3-JtRwuc2Wfjld2a?dl=0

I want the 'building footprints' cut out of the 'negative area' polygon.

1
  • In some cases, this was a matter of restarting the program. I have had several 'blank' layers after running the difference (and other) tools, but restarting QGIS fixed it... Perhaps something to do with how it was loaded in memory... Commented Jun 11, 2021 at 10:51

2 Answers 2

3

I used the difference tool under Vector -> Geoprocessing tools -> Difference, and it fails as yours. I also tested the Difference tool located Processing toolbar -> QGIS-> Vector overlay tools -> Difference, and it was failed. However, when I used the difference tool exists under Processing toolbar -> SAGA -> Vector polygon tools -> Difference, the process succeeded.

enter image description here

enter image description here

It looks like there is a problem or bug in the Difference tool located under QGIS menu toolbar and under Processing toolbar -> QGIS .

I tested on QGIS 2.14.11

3
  • Thanks ahmadhanb that works fine for me too :) Thankyou for your help
    – Cam Oakley
    Commented Feb 23, 2017 at 4:43
  • Glad it worked. But I agree with @Albert that it is better to fix the topology if you want to continue working on the building shapefile.
    – ahmadhanb
    Commented Feb 23, 2017 at 5:17
  • Thank you, I was having a similar issue, both with QGIS and PostGIS. On QGIS 3.14 that tool is not present but is available via standalone SAGA 2.3.2 software. (There is a cut polygon tool in QGIS SAGA tool but that failed)
    – Cushen
    Commented Sep 10, 2021 at 6:20
3

The problem is in your data, not in the tools you use. Some of your buildings (158 of them) have topological errors. If you fix them, these tools will run just fine.

enter image description here

2
  • Hi Albert, thanks for your response. Yes the 'buildings' dataset is a bit wonky, however I checked and the buildings within my area of interest were fine. It will be interesting to see if fixing the entire layer does work. However using the difference version in the list of SAGA algorithms works.
    – Cam Oakley
    Commented Feb 23, 2017 at 4:41
  • Yes, the SAGA algorithm may omit the topology errors. Your area of interest however it does contain buildings with topology errors, 8 out of 26. I think it is a fair amount. Check ids: 1114, 1116, 1118, 1125, 1128, 1129, 1132 and 1134.
    – Albert
    Commented Feb 23, 2017 at 15:16

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.