don't allow bikes on highway=construction, fixes #582

This commit is contained in:
Emil Tin 2013-02-06 16:58:18 +01:00
parent 0b1d268b09
commit a4e322f085
3 changed files with 22 additions and 1 deletions

View File

@ -70,3 +70,12 @@ Feature: Bike - Accessability of different way types
| motorway | | | | |
| motorway | yes | | foot | |
| motorway | | yes | | foot |
@construction
Scenario: Bike - Don't allow routing on ways still under construction
Then routability should be
| highway | foot | bicycle | bothw |
| primary | | | x |
| construction | | | |
| construction | yes | | |
| construction | | yes | |

View File

@ -30,3 +30,10 @@ Bringing bikes on trains and subways
| (nil) | some_tag | | |
| (nil) | some_tag | no | |
| (nil) | some_tag | yes | x |
@construction
Scenario: Bike - Don't route on railways under construction
Then routability should be
| highway | railway | bicycle | bothw |
| primary | | | x |
| (nil) | construction | yes | |

View File

@ -131,6 +131,11 @@ function way_function (way, numberOfNodesInWay)
return 0
end
-- don't route on ways or railways that are still under construction
if highway=='construction' or railway=='construction' then
return 0
end
-- access
local access = Access.find_access_tag(way, access_tags_hierachy)
if access_tag_blacklist[access] then