EastCoastGreenwayAlliance / ecg-map

Interactive map and trip planner for the ECGA
https://map.greenway.org
7 stars 0 forks source link

Shortest route between two points #58

Open nilesbarnes opened 7 years ago

nilesbarnes commented 7 years ago

Challenge of system defaulting to shortest distance between two points to generate the cue/directions. Example: Portland, ME to Bangor, ME. System defaults to coastal route, instead of going through Augusta. Easiest solution to simply have explanatory text prepared for when a start and end point encompass both a spine route and complementary route or other such instance? On user end, simply picking a shortest distance can overcome the problem.

clhenrick commented 7 years ago

Agree it would be good to explain this caveat about the geo-router so users are able to work around this limitation. Unsure of the best way to do so however, given that the geo-router currently has not been built to give additional information on which route was chosen (spine vs. alternate) and why.

Descriptive text about the interactive map app could live on the main ECG website. Assume you will be mentioning the map there anyway and that it would be a good idea to tell people that it's currently in Beta, given the data issues that still need resolving for the geo-routing to function properly.

clhenrick commented 7 years ago

Beta meaning that all the bugs and features haven't been 100% ironed out yet.

nilesbarnes commented 7 years ago

@clhenrick @danrademacher Appears the tool defaults to shorter distance in some cases, but longer route in others. See Providence, RI to Boston, MA example: https://ecg-map.herokuapp.com/?loc=9,41.97379,-71.06781&route=41.82318,-71.41226,42.36057,-71.05323

danrademacher commented 7 years ago

@niles I don't think distance is the issue here, but I'm not sure what is causing the problem. I wonder if there's some issue with the southbound connections.

Waltham to Providence takes inland as expected: https://ecg-map.herokuapp.com/?loc=11,42.10816,-71.61610&route=42.37366,-71.23616,41.82318,-71.41226

But Providence to Waltham goes via the cape: https://ecg-map.herokuapp.com/?loc=10,41.98042,-70.88173&route=41.82318,-71.41226,42.37366,-71.23616

Similarly, from Calais to Providence goes inland: https://ecg-map.herokuapp.com/?loc=8,43.53063,-70.27130&route=45.18954,-67.27865,41.82318,-71.41226

But the reverse goes via the Cape: https://ecg-map.herokuapp.com/?loc=8,43.41502,-70.07355&route=41.82318,-71.41226,45.18954,-67.27865

I tested a few other routes to see what the limits are here:

Providence to West Boylston (https://ecg-map.herokuapp.com/?loc=11,42.20284,-71.48769&route=41.82318,-71.41226,42.34445,-71.74366) goes inland. But Providence to Hudson, MA, goes the long way around: https://ecg-map.herokuapp.com/?loc=10,41.99152,-70.95862&route=41.82318,-71.41226,42.39115,-71.56605

Have you inspected the northbound route from Providence to Boston inland for anything unusual?

nilesbarnes commented 7 years ago

We are looking into the routing in this area to see if we can glean insights.

danrademacher commented 7 years ago

This appears to be an artifact of the router preferring any turns that go in the OVERALL direction the user wants to go. So if they are going N, then it prefers northbound routes. Even if later they turn south.

So in Boston, the center point is on the Cape route and a route to Providence is going to start by preferring to South. And it gets to its destination, so it doesn't try anything else.

Providence to Boston seems at first like it SHOULDN'T do that, but there's a very small northbound turn right where the Cape Route splits, and that gets preferred to the southerly run that goes to the inland route.

Here's an example of a route just north of that turn: https://ecg-map.herokuapp.com/?loc=11,42.11401,-71.16394&route=41.82114,-71.38970,42.36057,-71.05323**