Don’t route on motorroads by foot or bicycle (#6697)

This commit is contained in:
Max Langer 2023-10-05 08:44:41 +02:00
parent 5723eaaa6a
commit 54c5830252
No known key found for this signature in database
GPG Key ID: 4F15D77A42AD2B33
6 changed files with 22 additions and 2 deletions

View File

@ -33,6 +33,7 @@
- FIXED: Correct HTTP docs to reflect summary output dependency on steps parameter. [#6655](https://github.com/Project-OSRM/osrm-backend/pull/6655)
- 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)
# 5.27.1

View File

@ -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 | |

View File

@ -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 | |

View File

@ -217,7 +217,8 @@ function setup()
avoid = Set {
'impassable',
'construction',
'proposed'
'proposed',
'motorroad'
}
}
end

View File

@ -70,7 +70,8 @@ function setup()
avoid = Set {
'impassable',
'proposed'
'proposed',
'motorroad'
},
speeds = Sequence {

View File

@ -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