a-b-street / osm2streets

Convert OSM to street networks with detailed geometry
https://a-b-street.github.io/osm2streets
Apache License 2.0
102 stars 9 forks source link

Don't collapse sausage links that come from roundabouts. Fixes #105 #174

Closed dabreegster closed 1 year ago

dabreegster commented 1 year ago

https://www.openstreetmap.org/way/47934833 and https://www.openstreetmap.org/way/235499756 are two examples of a single OSM way with junction=roundabout. Previously they were detected as a "sausage link" (we really need a glossary) and collapsed down incorrectly. I added a test to check this, and fixed the false positive by making sure the two pieces of the sausage link come from different original OSM ways.

For explanatory benefit, this is a sausage link: Screenshot from 2023-01-31 10-30-55 https://www.openstreetmap.org/way/481131862 and https://www.openstreetmap.org/way/291394487, the two sides, come from different OSM objects. This transformation simplifies it to Screenshot from 2023-01-31 10-31-34 with a new "lane" in the middle representing the physical divider.

After A/B Street pulls in the new osm2streets version, this'll fix https://github.com/a-b-street/abstreet/issues/1053