This idea also pairs well with (replaces?) Add a route suggester/builder
I like that your idea includes an imagined interface - this helps a lot!
I’ve been researching third party tooling/software that I might be able to use to achieve this. It was a little while ago, now, but I did get a (not incredibly functional) proof-of-concept working with Mapbox Directions.
- GraphHopper Directions API with Route Optimization
- Navigation for people, packages, and vehicles
- http://pgrouting.org
- http://project-osrm.org/
- GitHub - anvaka/ngraph.path: Path finding in a graph
- GitHub - ibaaj/dijkstra-cartography: Using Dijkstra's algorithm ("finding the shortest paths between nodes in a graph") to draw maps .
One hurdle I have is that each Street’s Nodes aren’t in “order”, so there’s no default first/last Node or an inherently ordered “next” Node from any given Node. So I couldn’t toss a bunch of Nodes at the routing engine and say “give me a route from [starting point], past all of these nodes, and back to [ending point]”. One approach I tried was to use first/last Nodes, but that ended up with the same trouble – although – I’ve had another idea of splitting my Streets up into pieces (in the database/not in a way that’s visible to users), because that’s how OpenStreetMap stores them. Those pieces may have better-defined starts/ends, so that approach could solve the problem (or at least help).