dabreegster / route_snapper

Draw routes in MapLibre snapped to a street network using client-side routing
https://dabreegster.github.io/route_snapper
Apache License 2.0
147 stars 9 forks source link

Add option to planar-ize the input graph #48

Open dabreegster opened 10 months ago

dabreegster commented 10 months ago

I've got this working nicely in https://github.com/dabreegster/ltn/blob/fb4e947b75e719bfd01f9f3b5bb3c3680d23508c/backend/src/lib.rs#L94. Where bridges/tunnels cross another road, we can insert more intersections, so that the graph becomes planar, and drawing areas gets much nicer.

It'd be ideal to move the code here, but since the underlying geo operations work in euclidean space, probably also have to copy over the mercator.rs stuff. Or ideally upstream that in geo first.