diff --git a/CHANGELOG.md b/CHANGELOG.md index 0114a1f02e3..7eac3442c46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - CHANGED: Upgrade Cucumber-js to v12 [#7221](https://github.com/Project-OSRM/osrm-backend/pull/7221) - CHANGED: Add libcap-setcap to alpine dockerfile [#7241](https://github.com/Project-OSRM/osrm-backend/issues/7241) - FIXED: Minor misspellings found in source code, comments and documents [#7215](https://github.com/Project-OSRM/osrm-backend/pull/7215) + - FIXED: Use `cycleway:both` if available. [#6179](https://github.com/Project-OSRM/osrm-backend/issues/6179) # 6.0.0 - Changes from 6.0.0 RC2: None diff --git a/features/bicycle/cycleway.feature b/features/bicycle/cycleway.feature index c04d7aabd16..91f6568a1ba 100644 --- a/features/bicycle/cycleway.feature +++ b/features/bicycle/cycleway.feature @@ -97,3 +97,13 @@ Feature: Bike - Cycle tracks/lanes | residential | track | yes | 15 km/h | 4 km/h +-1 | | cycleway | track | yes | 15 km/h | 4 km/h +-1 | | footway | track | yes | 15 km/h | 4 km/h +-1 | + + Scenario: Bike - Cycleway should fall back to cycleway:both + Then routability should be + | highway | cycleway:both | forw | backw | + | motorway | track | x | | + | motorway | lane | x | | + | motorway | shared | x | | + | primary | track | x | x | + | primary | lane | x | x | + | primary | shared | x | x | diff --git a/profiles/bicycle.lua b/profiles/bicycle.lua index 76335155365..b516336f9bc 100644 --- a/profiles/bicycle.lua +++ b/profiles/bicycle.lua @@ -306,7 +306,8 @@ function handle_bicycle_tags(profile,way,result,data) data.barrier = way:get_value_by_key("barrier") data.oneway = way:get_value_by_key("oneway") data.oneway_bicycle = way:get_value_by_key("oneway:bicycle") - data.cycleway = way:get_value_by_key("cycleway") + local cycleway = way:get_value_by_key("cycleway") + data.cycleway = cycleway and cycleway or way:get_value_by_key("cycleway:both") data.cycleway_left = way:get_value_by_key("cycleway:left") data.cycleway_right = way:get_value_by_key("cycleway:right") data.duration = way:get_value_by_key("duration")