I'm trying to remove points that are in polygons with the basic difference tool (Vector-> Difference). What I see after the operation suits me because all points in polygons are deleted, but as I open the attributes table, there are the same count of point in initial and processed layers. Is there any issue with this process ? Is there any other process I could use? I tried SAGA difference but it's not available for points.

EDIT: There seems to be no incorect features topology

  • it could be the issue with NULL geometry. Try Select by expression and type $geometry is NULL (if there are any -> remove them) or simply use Remove null geometries in Processing Toolbox Commented Nov 30, 2017 at 14:16
  • Tried but not working either, I still get the same features count :/
    – Clement
    Commented Nov 30, 2017 at 14:20

2 Answers 2


I don't think the difference of a point layer and a polygon is anything but the original polygons. The points just seem to disappear because QGis draws the resulting polygons over the top of your points. You can do the difference operation the other way round to get the correct solution.

enter image description here Or you can avoid having to think about it by using spatial query.

What you want to do is select all the points that are in the polygons using the spatial query plugin.

enter image description here

You can then invert the selection (use the drop down menu)

enter image description here

Then you can save the layer (make sure to save just the selected features) to create a new layer with just the remaining points in it.

enter image description here

  • 2
    No that's not right. If you use the points as the input layer then it extracts the points that fall outside the polygons. I can confirm the behaviour being described as I've justed tested it on Mac QGIS2.18.14. It does seem to extract the correct points but it fails to recalculate the number of records in the shapefile, even if you export it out. Commented Nov 30, 2017 at 14:13
  • Ok i'll try this way, I just found it weird that points are disapearing in the layer view but not in the attributes table... Thanks !
    – Clement
    Commented Nov 30, 2017 at 14:13
  • If you do it as polygon diff points then you get all the polygons, points diff polygon you do get the external points and the attribute table count seems fine to me, on QGIS 2.18.14 Ubuntu. Do you have both layers in the same projection?
    – Ian Turton
    Commented Nov 30, 2017 at 14:19
  • Both layers are in the same projection yeah, I'm on windows though but I hope it doesn't matters... ^^ Also on 2.18.14
    – Clement
    Commented Nov 30, 2017 at 14:27

Solved it with spatial query also but used the 'disjoint' option. The attributes table is fine and the features count changes. Still an issue on qgis process...


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.