acteng / atip

Active Travel Infrastructure Platform
https://acteng.github.io/atip/
Apache License 2.0
22 stars 4 forks source link

route with branch #255

Closed buildvoc10 closed 1 year ago

buildvoc10 commented 1 year ago

new version (June 2023) when creating a route on public road , making a branch of adjacent road ? image

dabreegster commented 1 year ago

Could you please share the .geojson file from this? The "Export to GeoJSON" file in the corner, then upload the file here, or copy/paste the contents

robinlovelace-ate commented 1 year ago

I cannot reproduce this.

buildvoc10 commented 1 year ago

Surrey (4).txt Here an example, don't think was creating these "branches" on 24th June cleared cache using chrome

dabreegster commented 1 year ago

Thank you! I can reproduce the problem by drawing a short route over The Meadows at https://acteng.github.io/atip/scheme.html?authority=Surrey&schema=v1#18.69/51.2285668/-0.5773313. I'm not sure why this is happening; the geometry is based on center-lines that look fine in the underlying tool (https://a-b-street.github.io/osm2streets/#18.89/51.22854/-0.57727). I'll dig into this some more. Thanks for reporting the issue!

dabreegster commented 1 year ago

I've added some debugging and extracted the raw geometry used for routing. It looks perfectly fine in this area: Screenshot from 2023-06-29 11-27-20 So I believe the problem is route-snapper gluing together geometry incorrectly somehow. I'll continue looking into it and keep y'all posted here

dabreegster commented 1 year ago

The problem is at https://github.com/dabreegster/route_snapper/blob/99d7f0ce8303ed136b21ef4d83d0b7805ab97f53/route-snapper/src/lib.rs#L613. The snapped nodes are not located where the edge geometry meets. That problem is also visible above; the map pins are slightly off. Screenshot from 2023-06-29 11-34-32

dabreegster commented 1 year ago

Root problem is https://github.com/dabreegster/route_snapper/blob/99d7f0ce8303ed136b21ef4d83d0b7805ab97f53/osm-to-route-snapper/src/main.rs#L57, I believe. The geometric polygon center calculated will usually differ from the reference line's endpoint. We usually get lucky and the node winds up somewhere that looks more reasonable. I'll try regenerating this for some selected areas. If so, the fix will be to regenerate all graph files and bump the version used.

dabreegster commented 1 year ago

Hi @buildvoc10 , the problem should be fixed now: https://acteng.github.io/atip/scheme.html?authority=Surrey&schema=v1#18.69/51.2285668/-0.5773313

Thanks again for reporting and let us know if you have any more feedback / problems!

robinlovelace-ate commented 1 year ago

Amazing diagnostic/debugging and fixing adventure Dustin, great work!