Supports destination:street, resolves #3541

This commit is contained in:
Daniel J. Hofmann 2017-01-09 18:56:51 +05:30 committed by Daniel J. H
parent 1d4d3b80b5
commit fd57c5b48b
4 changed files with 35 additions and 23 deletions

View File

@ -16,28 +16,34 @@ Feature: Destination Signs
m n
o p
q r
s t
u v
"""
And the ways
| nodes | name | ref | destination | destination:ref | oneway | # |
| ab | AB | E1 | | | yes | |
| cd | CD | | Berlin | | yes | |
| ef | EF | | Berlin | A1 | yes | |
| gh | | | Berlin | A1 | yes | |
| ij | | | Berlin | | yes | |
| kl | KL | E1 | Berlin | A1 | yes | |
| mn | MN | | Berlin;Hamburg | A1;A2 | yes | |
| op | OP | | Berlin;Hamburg | A1;A2 | no | mis-tagged destination: not a oneway |
| qr | QR | | | A1;A2 | yes | |
| nodes | name | ref | destination | destination:ref | destination:street | oneway | # |
| ab | AB | E1 | | | | yes | |
| cd | CD | | Berlin | | | yes | |
| ef | EF | | Berlin | A1 | | yes | |
| gh | | | Berlin | A1 | | yes | |
| ij | | | Berlin | | | yes | |
| kl | KL | E1 | Berlin | A1 | | yes | |
| mn | MN | | Berlin;Hamburg | A1;A2 | | yes | |
| op | OP | | Berlin;Hamburg | A1;A2 | | no | mis-tagged destination: not a oneway |
| qr | QR | | | A1;A2 | | yes | |
| st | ST | | | | St Street | yes | |
| uv | UV | | Berlin | | St Street | yes | |
When I route I should get
| from | to | route | destinations | ref | # |
| a | b | AB,AB | , | E1,E1 | |
| c | d | CD,CD | Berlin,Berlin | , | |
| e | f | EF,EF | A1: Berlin,A1: Berlin | , | |
| g | h | , | A1: Berlin,A1: Berlin | , | |
| i | j | , | Berlin,Berlin | , | |
| k | l | KL,KL | A1: Berlin,A1: Berlin | E1,E1 | |
| m | n | MN,MN | A1, A2: Berlin, Hamburg,A1, A2: Berlin, Hamburg | , | |
| o | p | OP,OP | , | , | guard against mis-tagging |
| q | r | QR,QR | A1, A2,A1, A2 | , | |
| from | to | route | destinations | ref | # |
| a | b | AB,AB | , | E1,E1 | |
| c | d | CD,CD | Berlin,Berlin | , | |
| e | f | EF,EF | A1: Berlin,A1: Berlin | , | |
| g | h | , | A1: Berlin,A1: Berlin | , | |
| i | j | , | Berlin,Berlin | , | |
| k | l | KL,KL | A1: Berlin,A1: Berlin | E1,E1 | |
| m | n | MN,MN | A1, A2: Berlin, Hamburg,A1, A2: Berlin, Hamburg | , | |
| o | p | OP,OP | , | , | guard against mis-tagging |
| q | r | QR,QR | A1, A2,A1, A2 | , | |
| s | t | ST,ST | St Street,St Street | , | |
| u | v | UV,UV | Berlin,Berlin | , | city preferred over street |

View File

@ -36,4 +36,4 @@ Feature: Destination Signs
| h | g | GH,GH | A2: Hamburg,A2: Hamburg | , | |
| i | j | IJ,IJ | A1: Berlin,A1: Berlin | , | |
| l | k | KL,KL | A2: Hamburg,A2: Hamburg | , | |
| m | n | MN,MN | , | , | guard against mis-tagging |
| m | n | MN,MN | , | , | guard against mis-tagging |

View File

@ -18,11 +18,12 @@ end
function Destination.get_destination(way, is_forward)
ref = Destination.get_directional_tag(way, is_forward, 'destination:ref')
dest = Destination.get_directional_tag(way, is_forward, 'destination')
street = Destination.get_directional_tag(way, is_forward, 'destination:street')
if ref and dest then
return ref .. ': ' .. dest
else
return ref or dest or ''
return ref or dest or street or ''
end
end
return Destination
return Destination

View File

@ -330,6 +330,11 @@
"object_types": [ "way" ],
"description": "Destination and direction of road for oneways for navigation instructions, supplements name."
},
{
"key": "destination:street",
"object_types": [ "way" ],
"description": "Destination of road for navigation instructions, supplements name."
},
{
"key": "destination:ref",
"object_types": [ "way" ],