2

I have a road network file (openstreetmap exported file) that has various types of edges (freeway, highway, primary, residential, service, ...). Some of these edges have multiple lanes (parallel), so that each one of these lanes considered a separate edge in road network, for example: image

How can I merge these lanes in one lane and construct the road network algorithmic (I know in some applications, we can select ways and merge them with right click, but I can't do this for 100000+ edges in large cities)?

1
  • 2
    What software are you using? Commented Feb 3, 2018 at 12:10

1 Answer 1

1

This sounds like a workload that you should script. Conceptually the following steps could be taken:

  1. For each road segment, check if there are roads near it (say, within 10 meters or so). You could also call this a 'select by location', with the 'Are within x distance' operation.
  2. For each road from 1, check if they are parallel and have the same speed limit (to avoid merging highways with smaller roads running parallel).
  3. Merge the selected roads.

The speudocode would be something like:

for road in roads: select other roads within 10 meters for road in selected roads: caculate Linear Directional Mean Compare this with the main road you are comparing to if match: Merge road 1 and road 2 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.