Open Nate-Wessel opened 4 years ago
See also: https://gist.github.com/Nate-Wessel/e7d72da7c7c12e00a472b41537334f8d A slow overpass query for helping to detect split ways
It seems like some sort of force-based (e.g. D3-force) algorithm could work here.
Where very close, lines should essentially snap together. Where very far apart (e.g. Spadina Crescent) they should stay at their original positions. Edge cases like the approach to that crescent should have a smooth transition between merged and split.
See interactive JS demo: https://observablehq.com/d/0f97e8cb32b46de4
OSM data for Toronto has hundreds of split ways representing larger streets where they are divided by traffic islands:
This is usually done to help with car routing, but they are ugly and inappropriate at the scale of this map. They should somehow be merged/simplified into a single way. Some of this can be done directly in OSM where appropriate, but most of the changes will need to be made algorithmically while processing the data.
Split ways can be detected as oneway pairs having the same name, especially if they connect at a shared node to a two-way with the same common name.
There may also be cases where it would be innapropiate to merge ways, such as some parts of Spadina, Queensway, University, etc. We would need to specify some sort of distance threshold past which merging wouldn't happen. We wouldn't want to eliminate the Spadina Crescent or Queens Park!