2

I have a huge amount of points and some lines in my QGIS map.

I want to do a selection just of those points that are minimum 10 km far from the line.

Any idea?

I have no problem doing the opposite (points within 10 km of the line) using buffers - but that's not what i need.

  • 5
    Select the points within 10km (a buffer) then switch selection. – Michael Stimson Jun 9 '16 at 23:25
2

First create a buffer 10km from your lines, then either as @Micheal suggests select all the points that intersect the buffer (using the spatial query plugin) and then invert the selection. Or more directly select using isDisjoint (which is not intersects really).

  • I created a Buffer of 10 km around the line. Then I used the Spatial Query to create a new selection of villages inside of the buffer (Points -> Within> buffer). It works and now I have a new layer with villages within 10km from the line. The question is: How to switch the selection, I didn't really get it @Michael – Janita Jun 10 '16 at 9:19
  • 1
    look on the select by expression menu (little E/yellow square) and there is an operation - invert selection or if you open attribute table there is a half yellow/half white icon there too. – Ian Turton Jun 10 '16 at 9:23
  • it will work on the "selected layer" ie the one that is highlighted in the layer list – Ian Turton Jun 10 '16 at 10:15
  • I found the operation BUT the thing is that I have two layers: the original one with all the points (12 566 points) and the second one with just points within 10km distance from lines (962 points). When I click on the second layer and then invert selection, these points (962 points) dissapear, which is obvious I suppose. In any case I cannot see the points outside of 10km area from lines. A way to do could be: show me all the points (layer 1) minus villages within 10km from lines (layer 2). Is this possible somehow? @Michael – Janita Jun 10 '16 at 10:24
  • Finally I was successful :) I created a new Spatial Query where I put as Source features: All points layer; where the feature: is disjoint, reference features of: points within the 10km buffer.Then I right click on the layer All points -> Save as: Save only selected features. Thanx a lot for your help – Janita Jun 10 '16 at 13:55

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.