diff --git a/CHANGELOG.md b/CHANGELOG.md index 696c5497dd6..65758c89932 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,7 @@ - FIXED: Remove unused C++ headers [#7105](https://github.com/Project-OSRM/osrm-backend/pull/7105) - Profiles: - FIXED: Bicycle and foot profiles now don't route on proposed ways [#6615](https://github.com/Project-OSRM/osrm-backend/pull/6615) + - FIXED: Bicycle and foot profiles now don't route on motor roads [#6697](https://github.com/Project-OSRM/osrm-backend/pull/6697) - ADDED: Add optional support of cargo bike exclusion and width to bicyle profile [#7044](https://github.com/Project-OSRM/osrm-backend/pull/7044) - Routing: - FIXED: Fix adding traffic signal penalties during compression [#6419](https://github.com/Project-OSRM/osrm-backend/pull/6419) diff --git a/features/bicycle/way.feature b/features/bicycle/way.feature index b9beb5f0f58..4f8c5d4ce5a 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 | + | (nil) | (nil) | x | + | (nil) | yes | | \ No newline at end of file diff --git a/features/foot/way.feature b/features/foot/way.feature index 6916adece43..24cf453b009 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 | + | (nil) | (nil) | x | + | (nil) | yes | | \ No newline at end of file diff --git a/profiles/bicycle.lua b/profiles/bicycle.lua index 76335155365..9fe1bca49c4 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