QGIS Difference Tool Error – How to Fix ‘Difference Failed’ with Point Layers in Geoprocessing

differencesgeoprocessingpointqgisqgis-processing

Is it possible in QGIS 3.16 to use the geoprocessing tool "Difference" with point layers as input and overlay?

The documentation seems to indicate that it is. However, when I do a test with very simple layers, it gives a GEOS geoprocessing error:

difference failed

The input layer has 10 points, and the overlay has 6 points – these 6 points are in the exact same location as 6 points in the input layer.

Best Answer

I get the same error. How to solve the problem:

  1. Apply a (small) buffer of the same size around both point layers.
  2. Run the Difference tool on these buffers.
  3. From the resulting buffers (the difference), get the centroids.

And here you are with the difference-points you want.