a-b-street / osm2streets

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

Wrong driving side for non-sovreign LHT jurisdictions inside RHT countries #267

Open Kovoschiz opened 1 month ago

Kovoschiz commented 1 month ago

Bidirectional roadways don't change to the correct side in Hong Kong, Macau, and US Virign Islands. They are admin_level=3 "states", causing the geocoder to not recognize them as "country", and this difference skipped. This results in wrong lane layout (asymmetric lane count roads, and becomes inconsistent with divided roads), road marking orientation, and "movement arrows". I haven't noticed what happens with sidewalks. UK RHT overseas territories don't have this problem, being admin_level=2 https://en.wikipedia.org/wiki/Left-_and_right-hand_traffic#Worldwide_distribution_by_country

Kovoschiz commented 1 month ago

Ok I had not understood where the country lookup went. Now I see it's in https://github.com/a-b-street/country-geocoder ? But do you want to change that there, as it's technically returning the correct sovereign states, only not for traffic jurisdiction.

dabreegster commented 1 month ago

You're right, country-geocoder is the place where this is happening. If you can suggest a fix or point to a different data source there, happy to make it. The geocoding could be used for more things in the future -- default speed limits, lane widths, lane marking styling -- but for now it just matters for the LHT/RHT. I'm fine with making changes to fix this there.

Alternatively, we could try switching to https://github.com/westnordost/country-boundaries-rust, based on data used in StreetComplete and probably much more correct