diff --git a/CHANGELOG.md b/CHANGELOG.md index af4b306dc1c..fd87301e682 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,8 @@ - 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) - - Profile: + - Profiles: + - FIXED: Bicycle and foot profiles now don't route on motor roads [#6697](https://github.com/Project-OSRM/osrm-backend/pull/6697) - FIXED: Use `cycleway:both` if available. [#6179](https://github.com/Project-OSRM/osrm-backend/issues/6179) - FIXED: Correctly limit exclude classes to 7. [#7322](https://github.com/Project-OSRM/osrm-backend/pull/7322) diff --git a/features/bicycle/way.feature b/features/bicycle/way.feature index b9beb5f0f58..f2a371bc265 100644 --- a/features/bicycle/way.feature +++ b/features/bicycle/way.feature @@ -40,3 +40,9 @@ Feature: Bike - Accessability of different way types | highway | man_made | bothw | | (nil) | (nil) | | | (nil) | pier | x | + + Scenario: Bike - Motorroad + Then routability should be + | highway | motorroad | bothw | + | primary | (nil) | x | + | primary | yes | | diff --git a/features/foot/way.feature b/features/foot/way.feature index 6916adece43..44dc3136a2c 100644 --- a/features/foot/way.feature +++ b/features/foot/way.feature @@ -42,3 +42,9 @@ Feature: Foot - Accessability of different way types | footway | | | x | | proposed | | | | | proposed | yes | yes | | + + Scenario: Foot - Motorroad + Then routability should be + | highway | motorroad | forw | + | primary | (nil) | x | + | primary | yes | | diff --git a/profiles/bicycle.lua b/profiles/bicycle.lua index b516336f9bc..c5e883f715c 100644 --- a/profiles/bicycle.lua +++ b/profiles/bicycle.lua @@ -221,7 +221,8 @@ function setup() avoid = Set { 'impassable', 'construction', - 'proposed' + 'proposed', + 'motorroad' } } end diff --git a/profiles/foot.lua b/profiles/foot.lua index b0a97127210..3f2cc61b53d 100644 --- a/profiles/foot.lua +++ b/profiles/foot.lua @@ -70,7 +70,8 @@ function setup() avoid = Set { 'impassable', - 'proposed' + 'proposed', + 'motorroad' }, speeds = Sequence { diff --git a/profiles/lib/way_handlers.lua b/profiles/lib/way_handlers.lua index b1341023509..d6c93116565 100644 --- a/profiles/lib/way_handlers.lua +++ b/profiles/lib/way_handlers.lua @@ -634,6 +634,11 @@ function WayHandlers.blocked_ways(profile,way,result,data) return false end + -- motorroad + if profile.avoid.motorroad and way:get_value_by_key("motorroad") == "yes" then + return false + end + -- In addition to the highway=construction tag above handle the construction=* tag -- http://wiki.openstreetmap.org/wiki/Key:construction -- https://taginfo.openstreetmap.org/keys/construction#values