When I use the "Line Intersections" tool in QGIS, it doesn't create whole intersect points. Also, the gif and picture below show that the lines intersect but the plugin doesn't assign any point to them. How can I solve the problem?

enter image description here

enter image description here

  • The geometries, you think they are two separate lines, may be one polyline. If it is, the tool doesn't generate intersection points for the lines within the same geometry, even if it contains an intersection. Commented Oct 12, 2021 at 12:39
  • 3
    Select the line(s), if it is one geometry, then you should split it and run the tool again. Otherwise, the lines probably do not touch. Commented Oct 12, 2021 at 12:45
  • 1
    This line, which is inside the circle is not the polyline. Also, when we use the v.clean tool in QGIS, the same situation happened and there is no problem with snapping. Commented Oct 12, 2021 at 13:48
  • If they dont touch, take a look at "Extend lines" or "Snap geometries to layer" from processing toolbox.
    – MrXsquared
    Commented Oct 12, 2021 at 14:55
  • 2
    Did you run the check validity tool by any chance? I always do if a tool fails to work as expected since it is quick and easy.
    – John
    Commented Oct 12, 2021 at 16:36

2 Answers 2


This is a very common issue in GIS. In the case of your data, it occurs because the vertical line doesn't have a node that matches the final point of the diagonal line, and due to geometric non-robustness, the geometry engine fails finding an intersection there.


You need to make sure the layer has a proper topology before running the Line intersections algorithm (it means, either modify your original layer or run the Line intersections over a modified copy of your original layer). In practice, just follow these steps:

  1. Run the Snap Geometries to Layer with the following parameters:

    enter image description here

    Same input and reference layers. The tolerance is up to you, but a tolerance of 1 mm. works well for most cases (planar coordinates). Regarding the behavior, you can choose the second option, called Prefer closest point, insert extra vertices where required (it's important to choose one that inserts vertices).

  2. Run the Line intersections algorithm using the output of the step 1.

And that's it. Doing that you'll get the point intersections you expect.

enter image description here


I suggest you to build a model like the following, so that you get what you want in one go. Anyway, you'll probably need to remove the duplicated intersections the Line intersections returns.

enter image description here

Note 1: The Snap Geometries to Layer algorithm has been heavily optimized and adjusted lately (see https://github.com/qgis/QGIS/pull/42781 and https://twitter.com/GeoTux2/status/1435136250487480320). So, you need to use QGIS >= v3.21.x. QGIS 3.22.0 will be released in 9 days, but you can download a nightly build if you cannot wait until then.

Note 2: Fortunately, GEOS v3.9 solves this issue of geometric non-robustness. Therefore, as soon as QGIS upgrades GEOS to v3.9, we'll be able to see the expected results without intermediate steps (like running Snap Geometries to Layer). Since these thing don't happen automatically, you could get involved in the project. Sometimes an effort from the community itself is needed before such changes happen (e.g., via funding).

  • Could you elaborate a bit on the robustness aspect? Basically, it is due to a rounding issue that snapping does not always work as expected, is that correct?
    – Babel
    Commented Oct 14, 2021 at 7:17
  • I tried your solution with the dataset provided by OP. I used the very settings you propose for the 'Snap Geometries to Layer' tool, however, line intersection on the modified layer still doesn't find all intersecting points. I increased tolerance to 1 m, still with the same result. Using QGIS 3.20.0 with GEOS 3.9.1-CAPI-1.14.2. Using the extend line solution works with OP's (unprocessed) dataset, even the simple intersection operation with QGIS expression works, without extending the lines.
    – Babel
    Commented Oct 14, 2021 at 7:41
  • @Babel, the answer says that you need to use at least QGIS 3.21 (dev version). Yes, that's also something I explained in the answer, GEOS 3.9 solves the issue, see Note 2. Commented Oct 14, 2021 at 12:50

Probably in the cases where you don't get an intersection, probably the lines do not touch or there is a snapping issue like this one. There's probably a (very tiny) gap- so small you don't see it. The solution is to make the lines a tiny bit longer: to extend it using QGIS expression extend.

You can test it by applying an additional Geometry generator symbol layer, rendering as point and using this expression:


Than change this expression by replacing $geometry in line two by this: extend ($geometry, 0.1, 0.1). With this, you make your lines a tiny bit longer (by 0.1 map units - change this value if needed). In this case, you get additional intersection points where the initial lines do not touch. When satisfied with the result, you can convert it to actual geometries (new layer) using Geometry by expression with the same expression. Run Multipart to single parts on the result.

Left: one line does not intersect the others (red circle); Right: with the revised expression, you also get a point there: enter image description here

  • 2
    I used the snapping tool and also I checked the intersection without point there is no problem with snapping. I zoomed enough. I applied your solution. It generates some points but also line intersection tool generates them. Your solution does not generate any point that. line intersection tool does not generate too. Commented Oct 12, 2021 at 14:07
  • 2
    Can you share your data (or a sample of it), containing the problematic spots?
    – Babel
    Commented Oct 12, 2021 at 14:16
  • github.com/aycatbkoglu/QGIS-Intersection-tool-error-dataset our dataset is in the repo Commented Oct 13, 2021 at 14:08
  • I downloaded your files and applied the first expression from my answer (without extend_line): all intersections show correctly, see: i.sstatic.net/kjnue.png - did you try this solution? It should return all intersection points correctly
    – Babel
    Commented Oct 13, 2021 at 18:37
  • Line intersection tool indeed does not generate all points, even if they seem to be snapped. However, QGIS seems to have a snapping problem sometimes, see this: gis.stackexchange.com/a/379655/88814 . The solution here is to extend the lines a little bit: with that, even the Line interesection tool creates all correct points.
    – Babel
    Commented Oct 13, 2021 at 18:43

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.