1

I try to use the "Select by Location" tool in QGIS 3.10 to:

  • Select points in one layer located on lines of another layer (I am using "intersect" option but I have also tried the other options)
  • Select the lines whose end points are located on the lines of another layer (Touch option) and I get no results.

Does the tool work or is it only usable with polygon layers? What are the other solutions to get what I want?

Layers in GeoPackage available on https://drop.infini.fr/

4
  • 2
    I just tried your both examples in QGIS 3.4 and "Select by location" is working i.e. selecting. So, my assumption #1 is that your points are not actually sitting on the lines, so I will suggest creating a tiny buffer around your lines and then running the "Select by location" between points and buffers (this is an another solutions to get what you want). Another assumption #2 is that your layers are not in the same CRS, so they may be visually placed correctly but due to different CRS the selection won't work.
    – Taras
    Sep 4, 2020 at 11:16
  • Thanks for your answer. The CRS is the same for the two layers. If I create new features in my point layer, with snapping on my line layer, and use "select by location", the tool select only points on line's vertice.
    – Ploum
    Sep 4, 2020 at 12:42
  • Can I add the data there?
    – Ploum
    Sep 4, 2020 at 12:48
  • My datas are there : drop.infini.fr/r/…
    – Ploum
    Sep 4, 2020 at 13:39

1 Answer 1

1

Your data looks as following

input

After testing it with "Select by location" with disjoin-method, see image below. I may say that there is a micro distance exists between those points and line.

disjoin

So, there are several suggestions that may lead you to the desired output

#1 using a small buffer around the line layer, like on the image below

solution_2

#2 by means of "Snap geometries to layer" or SAGA's module "Snap points to lines". This will improve the topological relation between two layers' geometries.

#3 Double checking the correctness of CRS on stages of saving/sharing data.


References:

1
  • Thanks for your answer. Only the first method with the buffer works. I tried to use "snap geometries to layer" and "Snap points to lines". But with the new layer of points, I can select only the point in the node of the line. I don't understand why my points are not exactly on the line. I've tried to add some new point with the snapping toolbar. This new point is normally on the line but in fact no because I can't select it with "select by location". My two layers are both in EPSG 3945
    – Ploum
    Sep 15, 2020 at 9:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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