Make pedestrian roads marked as destination routable with car profile.
Check provided tests with: cucumber --tags @access -p verify References: - https://github.com/Project-OSRM/osrm-backend/issues/1617 - http://wiki.openstreetmap.org/wiki/Tag:highway%3Dpedestrian - http://wiki.openstreetmap.org/wiki/Key:motorcar - http://wiki.openstreetmap.org/wiki/Key:access
This commit is contained in:
parent
70bb082973
commit
b6ef558c86
@ -125,13 +125,15 @@ Feature: Car - Restricted access
|
|||||||
|
|
||||||
Scenario: Car - Access combinations
|
Scenario: Car - Access combinations
|
||||||
Then routability should be
|
Then routability should be
|
||||||
| highway | accesss | vehicle | motor_vehicle | motorcar | bothw |
|
| highway | accesss | vehicle | motor_vehicle | motorcar | bothw |
|
||||||
| runway | private | | | permissive | x |
|
| runway | private | | | permissive | x |
|
||||||
| primary | forestry | | yes | | x |
|
| primary | forestry | | yes | | x |
|
||||||
| cycleway | | | designated | | x |
|
| cycleway | | | designated | | x |
|
||||||
| residential | | yes | no | | |
|
| residential | | yes | no | | |
|
||||||
| motorway | yes | permissive | | private | |
|
| motorway | yes | permissive | | private | |
|
||||||
| trunk | agricultural | designated | permissive | no | |
|
| trunk | agricultural | designated | permissive | no | |
|
||||||
|
| pedestrian | | | | | |
|
||||||
|
| pedestrian | | | | destination | x |
|
||||||
|
|
||||||
Scenario: Car - Ignore access tags for other modes
|
Scenario: Car - Ignore access tags for other modes
|
||||||
Then routability should be
|
Then routability should be
|
||||||
|
@ -302,8 +302,12 @@ function way_function (way, result)
|
|||||||
result.backward_speed = highway_speed
|
result.backward_speed = highway_speed
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
-- make an exception for restricted highway=pedestrian with motorcar=destination
|
||||||
|
local motorcar = way:get_value_by_key("motorcar")
|
||||||
|
local pedestrian_road = motorcar and "destination" == motorcar and "pedestrian" == highway
|
||||||
|
|
||||||
-- Set the avg speed on ways that are marked accessible
|
-- Set the avg speed on ways that are marked accessible
|
||||||
if access_tag_whitelist[access] then
|
if access_tag_whitelist[access] or pedestrian_road then
|
||||||
result.forward_speed = speed_profile["default"]
|
result.forward_speed = speed_profile["default"]
|
||||||
result.backward_speed = speed_profile["default"]
|
result.backward_speed = speed_profile["default"]
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user