Skip to content

Commit

Permalink
Make an exception for block barriers in bicycle and foot profile.
Browse files Browse the repository at this point in the history
This adds `barrier=block` exceptions to the respective white lists.

In addition this adds tests to check for the exception in bicycle and
foot profiles and makes sure cars are still not able to cross them.

Checked with:

    cucumber --tags @barrier -p verify

References:

- #1643
- http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dblock
  • Loading branch information
daniel-j-h committed Sep 7, 2015
1 parent bcc41bf commit 345d5e8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions features/bicycle/barrier.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Feature: Barriers
| wall | |
| fence | |
| some_tag | |
| block | x |

Scenario: Bike - Access tag trumphs barriers
Then routability should be
Expand Down
1 change: 1 addition & 0 deletions features/car/barrier.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Feature: Car - Barriers
| wall | |
| fence | |
| some_tag | |
| block | |

Scenario: Car - Access tag trumphs barriers
Then routability should be
Expand Down
1 change: 1 addition & 0 deletions features/foot/barrier.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Feature: Barriers
| wall | |
| fence | |
| some_tag | |
| block | x |

Scenario: Foot - Access tag trumphs barriers
Then routability should be
Expand Down
2 changes: 1 addition & 1 deletion profiles/bicycle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local find_access_tag = require("lib/access").find_access_tag
local limit = require("lib/maxspeed").limit

-- Begin of globals
barrier_whitelist = { [""] = true, ["cycle_barrier"] = true, ["bollard"] = true, ["entrance"] = true, ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true, ["no"] = true }
barrier_whitelist = { [""] = true, ["cycle_barrier"] = true, ["bollard"] = true, ["entrance"] = true, ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true, ["no"] = true, ["block"] = true }
access_tag_whitelist = { ["yes"] = true, ["permissive"] = true, ["designated"] = true }
access_tag_blacklist = { ["no"] = true, ["private"] = true, ["agricultural"] = true, ["forestry"] = true }
access_tag_restricted = { ["destination"] = true, ["delivery"] = true }
Expand Down
2 changes: 1 addition & 1 deletion profiles/foot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
local find_access_tag = require("lib/access").find_access_tag

-- Begin of globals
barrier_whitelist = { [""] = true, ["cycle_barrier"] = true, ["bollard"] = true, ["entrance"] = true, ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true, ["no"] = true}
barrier_whitelist = { [""] = true, ["cycle_barrier"] = true, ["bollard"] = true, ["entrance"] = true, ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true, ["no"] = true, ["block"] = true}
access_tag_whitelist = { ["yes"] = true, ["foot"] = true, ["permissive"] = true, ["designated"] = true }
access_tag_blacklist = { ["no"] = true, ["private"] = true, ["agricultural"] = true, ["forestry"] = true }
access_tag_restricted = { ["destination"] = true, ["delivery"] = true }
Expand Down

0 comments on commit 345d5e8

Please sign in to comment.