diff --git a/CHANGELOG.md b/CHANGELOG.md index 614601a6c..473c2cc4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -79,6 +79,7 @@ - ADDED: Extract prerelease/build information from package semver [#6839](https://github.com/Project-OSRM/osrm-backend/pull/6839) - 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) - Routing: - FIXED: Fix adding traffic signal penalties during compression [#6419](https://github.com/Project-OSRM/osrm-backend/pull/6419) - FIXED: Correctly handle compressed traffic signals. [#6724](https://github.com/Project-OSRM/osrm-backend/pull/6724) diff --git a/features/bicycle/way.feature b/features/bicycle/way.feature index b9beb5f0f..4f8c5d4ce 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 6916adece..24cf453b0 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 19202768e..00038c1dc 100644 --- a/profiles/bicycle.lua +++ b/profiles/bicycle.lua @@ -217,7 +217,8 @@ function setup() avoid = Set { 'impassable', 'construction', - 'proposed' + 'proposed', + 'motorroad' } } end diff --git a/profiles/foot.lua b/profiles/foot.lua index fa5f8b663..9cf58326d 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 b13410235..d6c931165 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