Allow bicycle routing without access tag for railways with highway tag

http://www.openstreetmap.org/way/24455356
This commit is contained in:
Michael Krasnyk 2017-01-31 21:54:56 +01:00 committed by Patrick Niklaus
parent 1628ebb871
commit 6da4d918d0
2 changed files with 10 additions and 4 deletions

View File

@ -182,3 +182,9 @@ Feature: Bike - Access tags on ways
| bridleway | | yes | | x |
| bridleway | designated | | | |
| bridleway | | | | |
Scenario: Bike - Tram with oneway when access is implicit
Then routability should be
| highway | railway | oneway | bothw |
| residential | tram | yes | x |

View File

@ -259,10 +259,10 @@ function way_function (way, result)
result.forward_speed = platform_speeds[public_transport]
result.backward_speed = platform_speeds[public_transport]
elseif use_public_transport and railway and railway_speeds[railway] then
result.forward_mode = mode.train
result.backward_mode = mode.train
-- railways
if access and access_tag_whitelist[access] then
result.forward_mode = mode.train
result.backward_mode = mode.train
-- railways
if (not access and highway) or access_tag_whitelist[access] then
result.forward_speed = railway_speeds[railway]
result.backward_speed = railway_speeds[railway]
end