Directional Destination Tags
There are roughly 10k destination:forward and 10k destination:backward tags in OSM:
- http://taginfo.openstreetmap.org/keys/destination%3Aforward
- http://taginfo.openstreetmap.org/keys/destination%3Abackward
at the moment we
- only parse
destinationanddestination:reftags and - only set a way's destination when it's a oneway
this limitation is fine for most of the cases since motorways are implied oneway and motorway links are often if not always oneways, too.
This ticket is not about storing a forward and a backward destination value per way but instead taking destination:forward or destination:backward (depending on oneway=-1) into account.
Tasks:
- [ ] write Cucumber scenarios for combinations of
destination,destination:ref,destination:forward,destination:backward, andoneway=yes,oneway=no,oneway=-1(see existing scenarios) - [ ] in the profile (or maybe in profiles/lib/destinations.lua) pick up directional destination tag and set according to oneway direction (see e.g. directional hov handling)
@daniel-j-h I've been talking to @karenzshea (thanks Karen!) to try and figure out what is supposed to happen here. My understanding so far is this:
The point of this ticket is to take into account destination tags for ways that are labelled oneway=-1. So the first task is to write new cucumber test, similar to destination-signs.feature, actually gives the values -1 a destination instead of ignoring it. Then the next part is to update the code in the profile to stop ignoring the destination of any oneway=-1 and instead give it the correct forward or backward destination tag.
Is that right?
The point of this ticket is to take into account destination tags for ways that are labelled oneway=-1.
This ticket is to pick up destination:forward and destination:backward tags.
If it's not a oneway=-1 and there is not already a destination=* (or ref) tag you can use destination:forward=*. You can do the same with destination:backward if it's a oneway=-1.
At the moment OSRM only knows about destination signs in one direction (the way's forward direction), because the main use-case for destination signs is motorways (implied oneways) and motorway links (often if not always oneways), so storing forward and backward destination values in OSRM would be wasteful.
The logic could be for example:
if there is a destination tag and it's a oneway but not a oneway=-1
use destination tag
else if there is a destination:forward tag and it's a oneway but not a oneway=-1
use forward destination
else if there is a destination:backward and a oneway and it's a oneway=-1
use backward destination
else if there is a destination ref tag and it's a oneway but not a oneway=-1
use destination ref tag
Maybe grab a pen and paper and draw some motorway / motorway link scenarios with different tags.
@daniel-j-h okay so it's about making the destination tags on the oneways more clear:
oneway & !oneway=-1 == forward-destination
oneway & oneway=-1 == backward-destination
where before the above combinations only used regular destination and destination ref tags
Also note that there are destination:ref:forward and destination:ref:backward tags - there are about 4k of these globally, it's probably worth doing them at the same time.