diff --git a/features/bicycle/pushing.feature b/features/bicycle/pushing.feature index 37dff3d1f..8e2ca3052 100644 --- a/features/bicycle/pushing.feature +++ b/features/bicycle/pushing.feature @@ -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 | | diff --git a/features/bicycle/train.feature b/features/bicycle/train.feature index 1b5699f16..a4af362b5 100644 --- a/features/bicycle/train.feature +++ b/features/bicycle/train.feature @@ -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 | | diff --git a/profiles/bicycle.lua b/profiles/bicycle.lua index 7d51e8091..c5c2f64fb 100644 --- a/profiles/bicycle.lua +++ b/profiles/bicycle.lua @@ -130,7 +130,12 @@ function way_function (way, numberOfNodesInWay) then 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