I'm looking for a method in QGIS to clean the topology of a highway dataset from OpenStreetMap that contains bridges and tunnels.

I would like to break ways at every intersections which is represented by a node (more a vertex than a node since we speak of topology I think) but not where a way crosses another way without a common node ( which should involve a tunnel or bridge regarding the OpenStreetMap topology model).

Regarding what I have tested, it seams that v.clean can't do it and I can't find another method.

The best method I can think of is to filter bridges and tunnel before doing the v.clean but it is not perfect. Other method I have tested is to distinguish bridges and tunnels connected and disconnected to the network by playing with cross and touch spatial queries but it is not perfect too.

May be another way to explain my problem is : I'm looking for a method to clean topology of a network only on nodes.

  • There is a another question which is near of my problem but the solution is for ArcGis: [gis.stackexchange.com/questions/60855/…
    – Charles
    Commented May 24, 2017 at 12:32
  • It seems that v.clean with tool=bpol does the job but it is not clear (for me may be because of my English) in the manual. I am going to do more tests before answering my question.
    – Charles
    Commented May 24, 2017 at 12:57

2 Answers 2


There is no QGIS solution as far as I'm aware of.

Look into PostGIS-related solutions instead: How to split OSM roads into individual segments at intersections?


The Grass Gis tool v.clean (accessible in the Processing Toolbox) used with the parameter tool=bpol works.

  • I doubt v.clean ensures that the node id of actually intersecting roads is identical.
    – underdark
    Commented May 24, 2017 at 19:25
  • The node ids have no importance for me since I don't plan use to use cleaned data in OpenStreetMap or in pgRouting but thank for the link.
    – Charles
    Commented May 27, 2017 at 8:29

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.