diff --git a/features/bicycle/access_node.feature b/features/bicycle/access_node.feature index 5a6f2b5f953..1e08a94ba7a 100644 --- a/features/bicycle/access_node.feature +++ b/features/bicycle/access_node.feature @@ -7,20 +7,21 @@ Feature: Bike - Access tags on nodes Scenario: Bike - Access tag hierachy on nodes Then routability should be - | node/access | node/vehicle | node/bicycle | bothw | - | | | | x | - | yes | | | x | - | no | | | | - | | yes | | x | - | | no | | | - | no | yes | | x | - | yes | no | | | - | | | yes | x | - | | | no | | - | no | | yes | x | - | yes | | no | | - | | no | yes | x | - | | yes | no | | + | node/access | node/vehicle | node/bicycle | node/highway | bothw | + | | | | | x | + | yes | | | | x | + | no | | | | | + | | yes | | | x | + | | no | | | | + | no | yes | | | x | + | yes | no | | | | + | | | yes | | x | + | | | no | | | + | | | no | crossing | x | + | no | | yes | | x | + | yes | | no | | | + | | no | yes | | x | + | | yes | no | | | Scenario: Bike - Overwriting implied acccess on nodes doesn't overwrite way Then routability should be diff --git a/features/car/names.feature b/features/car/names.feature index ac4bfc8e23d..b6a95ae7f9a 100644 --- a/features/car/names.feature +++ b/features/car/names.feature @@ -10,13 +10,13 @@ Feature: Car - Street names in instructions | | c | And the ways - | nodes | name | - | ab | My Way | - | bc | Your Way | + | nodes | name | ref | + | ab | My Way | | + | bc | Your Way | A1 | When I route I should get - | from | to | route | - | a | c | My Way,Your Way | + | from | to | route | + | a | c | My Way,Your Way (A1) | @todo Scenario: Car - Use way type to describe unnamed ways diff --git a/profiles/bicycle.lua b/profiles/bicycle.lua index 9630a6e4c88..4053d341715 100644 --- a/profiles/bicycle.lua +++ b/profiles/bicycle.lua @@ -135,9 +135,14 @@ end function node_function (node, result) -- parse access and barrier tags + local highway = node:get_value_by_key("highway") + local is_crossing = highway and highway == "crossing" + local access = find_access_tag(node, access_tags_hierachy) if access and access ~= "" then - if access_tag_blacklist[access] then + -- access restrictions on crossing nodes are not relevant for + -- the traffic on the road + if access_tag_blacklist[access] and not is_crossing then result.barrier = true end else diff --git a/profiles/car.lua b/profiles/car.lua index 3e22afe0417..912d98cac45 100644 --- a/profiles/car.lua +++ b/profiles/car.lua @@ -345,9 +345,14 @@ function way_function (way, result) local service = way:get_value_by_key("service") -- Set the name that will be used for instructions - if ref and "" ~= ref then + local has_ref = ref and "" ~= ref + local has_name = name and "" ~= name + + if has_name and has_ref then + result.name = name .. " (" .. ref .. ")" + elseif has_ref then result.name = ref - elseif name and "" ~= name then + elseif has_name then result.name = name -- else -- result.name = highway -- if no name exists, use way type