I have a graphical model in QGIS that takes a basic sidewalk network (derived from OpenStreetMap data where separate sidewalks geometry exists) and adds additional crossings automatically. As a last step, I merge the original sidewalk layer with the newly created additional crossings using the "Merge vector layers" tool.

The problem is now that after merging, although the additional crossings definitely touch the sidewalks, they are not being included e.g. when using the "Service area (from point)" processing tool.

Here's an example that shows the problem. The service area (200 meters, magenta) does not include the whole extended network (blue). service area not including newly added crossings, background map: OpenStreetMap contributors

As a workaround I use the "Polygonize" algorithm (here it gets obvious that there are definitely no gaps between sidewalks and crossings!) and then the "Polygons to lines" algorithm and now it works. The problem is that with this workaround I "lose" all dead ends that are being part of the network.

The following image shows the network created via "Polygonize" and "Polygons to lines", not including dead ends, and the additional parts of the complete network (blue) not usable with the current approach.

full network end polygonized network without dead ends, background map: OpenStreetMap contributors

So, what is the correct way to merge two layers for a consistent combined network in QGIS?

Test data can be found here (link to my Nextcloud) (foot network from OSM, additional crossings and the two combined, with network analysis not working for the latter).

  • Lines from both layers probably are not properly connected: you don't have a commen vertext where they should touch. Snapping lines can be a bit tricky in QGIS, see: gis.stackexchange.com/q/379646/88814 Make sure the lines of the crossing layer really touches the lines of the sidewalk layer and then split the lines where they intersect. By the way: asking questions like these, it would be good to provide sample data.
    – Babel
    Oct 22, 2023 at 9:06
  • Thanks, @Babel. I added a link to the test data (corrected version).
    – winnewoerp
    Oct 22, 2023 at 15:52

1 Answer 1


Your crossings seem to not connect to the sidewalks. Make them a little bit longer, then create a connection between crossing sidewald/crossing lines by splitting the lines where they cross. Then run service area with a topology tolerance:

  1. Extend the crossings line by a small value like 0.1 using Extend lines.

  2. Combine both layers, e.v. copy paste the extended crossings to the sidewalk layer.

  3. Use Split with Lines with twice the combined layer as input and split layer.

  4. Run Service Area algorithm and define a small value for Topology Tolerance - I used 0.1. So gaps smaller than this will be ignored and lines are considered to be connected.

Black lines: sidewalks plus additional crossings; red: service area; Topology tolerance of 0.1; where there are gaps larger than this (see red circle), no connection will be created: enter image description here

  • Thank you. Sounds like a good solution, but in my case it did not work. I add a topology tolerance like you did and it still does not work. Very strange.
    – winnewoerp
    Oct 22, 2023 at 19:31
  • See edited answer, this should work. However, I don't know how you created the crossings in your model, there seems to be a problem when you create them. So maybe you want to revise this (but this would be another question).
    – Babel
    Oct 22, 2023 at 19:56
  • Thank you, I will do a few more tests and come up with the results here.
    – winnewoerp
    Oct 22, 2023 at 22:25

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.