Open BudgieInWA opened 1 year ago
https://github.com/a-b-street/osm2streets/blob/0ed585b4f30eb77bd492427e05d70401ff6ce297/streets_reader/src/lib.rs#L71
We should probably pick the center or polylabel
of streets.boundary_polygon
It's also maybe possible that the simplified Natural Earth boundaries in https://github.com/a-b-street/osm2lanes/tree/main/driving-side mess up the coast. Maybe we have to get a bit more complex and first find something road-like, then use that for the coordinate lookup
The simplified geometry is definitely the problem!
It looks like a higher precision is needed, at least for land-boundaries. A strictly enclosing simplification would be cool for ocean boundaries if the simplification can be specialised.
Hmm, https://github.com/westnordost/countryboundaries uses something from JOSM derived from OSM: https://josm.openstreetmap.de/export/HEAD/josm/trunk/resources/data/boundaries.osm Maybe we could also look into https://github.com/osm-without-borders/cosmogony.
The test
fremantle_placement
gets the wrong driving side, but others get the correct driving side.Maybe it's because it's close to the coast? Moving inland to the east, the driving side is wrong until about this position: http://127.0.0.1:5173/osm2streets/#18.380621480775794/-32.03855/115.77516