*=destination not respected

Routing
banoffee
2011-07-22
2013-05-29
  • banoffee
    banoffee
    2011-07-22

    Having carefully tagged a number of roads along which motor vehicles are prohibited "except for access" as motor_vehicle=destination, I expected them not to be used for a route for which they're an obvious short-cut… but in fact they were.

    For a specific test case (i.e. where it failed for me), routes that are coming north up Long Bank and need to get to/past Rockcliffe Way at http://www.openstreetmap.org/?lat=54.92052&lon=-1.57475&zoom=17&layers=M should be going all the way up to the mini-roundabout by Wrekenton High Street, and not using any of Ravensworth/Jubilee/Springfield Avenues as a short-cut.

    All 3 are tagged as motor_vehicle=destination, and I'd asked it for a car route that is routable without using these, with only a small detour, which it should have taken.

    I'm not sure if the not respecting this tag is an accidental omission, or lacking an algorithm…. I'm not familiar with the code or internal data structures, but the kind of thing I'd expect as a suitable heuristic would be either:

    1. As an extra phase before the main route search, follow every 'allowable' route (designated / yes / destination access under current routing profile), stopping when a "well-connected" road without such a restriction is reached. For the remainder of the routing, =destination should be treated as equivalent to =private.

    2. (probably simpler but not 100% accurate) Add a large enough penalty to whatever cost metric is used internally for route optimisation that it will prefer to take a long detour rather than use the way. This won't affect the routing where there is no other way than using the =destination road, but should otherwise avoid it… although depending on search algorithm, it could cause it to take longer in order to confirm that there really is no other way.

    3. Generate something equivalent to a turn restriction for every possible combination of entry point and exit point… in this case, no turning onto Rockcliffe Way from Long Bank via any of the three avenues. This would then be a form of pre-processing within the Osm2GpsMid rather than something that the main GpsMid code needs to worry about.

    Another relevant test case in that area is that Norwood Close isn't tagged with any restriction, but is only accessible via Ravensworth Avenue. Perhaps the "correct" way would be to tag any "islands" like this with the same restrictions as their "moat", but undoubtedly there are plenty more similar cases, and would presumably become many more if an hgv routing mode were enabled, due to the very large number of roads with restrictions for HGVs "except for access".