Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 6 additions & 0 deletions features/bicycle/way.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 | |
6 changes: 6 additions & 0 deletions features/foot/way.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 | |
3 changes: 2 additions & 1 deletion profiles/bicycle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ function setup()
avoid = Set {
'impassable',
'construction',
'proposed'
'proposed',
'motorroad'
}
}
end
Expand Down
3 changes: 2 additions & 1 deletion profiles/foot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ function setup()

avoid = Set {
'impassable',
'proposed'
'proposed',
'motorroad'
},

speeds = Sequence {
Expand Down
5 changes: 5 additions & 0 deletions profiles/lib/way_handlers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading