Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

highway=motorway_link does not imply oneway, fixes #1662 #2491

Merged
merged 1 commit into from
Jun 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions features/bicycle/oneway.feature
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ Feature: Bike - Oneway streets

Scenario: Bike - Implied oneways
Then routability should be
| highway | foot | bicycle | junction | forw | backw |
| | no | | | x | x |
| | no | | roundabout | x | |
| motorway | no | yes | | x | |
| motorway_link | no | yes | | x | |
| motorway | no | yes | roundabout | x | |
| motorway_link | no | yes | roundabout | x | |
| mini_roundabout | no | yes | | x | |
| highway | foot | bicycle | junction | forw | backw | # |
| | no | | | x | x | |
| | no | | roundabout | x | | |
| motorway | no | yes | | x | | |
| motorway_link | no | yes | | x | x | does not imply oneway |
| motorway | no | yes | roundabout | x | | |
| motorway_link | no | yes | roundabout | x | | |
| mini_roundabout | no | yes | | x | | |

Scenario: Bike - Overriding implied oneways
Then routability should be
Expand Down
24 changes: 13 additions & 11 deletions features/car/oneway.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@ Feature: Car - Oneway streets

Scenario: Car - Implied oneways
Then routability should be
| highway | junction | forw | backw |
| motorway | | x | |
| motorway_link | | x | |
| primary | | x | x |
| motorway | roundabout | x | |
| motorway_link | roundabout | x | |
| primary | roundabout | x | |
| mini_roundabout | | x | |
| highway | junction | forw | backw | # |
| motorway | | x | | |
| motorway_link | | x | x | does not imply oneway |
| primary | | x | x | |
| motorway | roundabout | x | | |
| motorway_link | roundabout | x | | |
| primary | roundabout | x | | |
| mini_roundabout | | x | | |

Scenario: Car - Overrule implied oneway
Then routability should be
| highway | oneway | forw | backw |
| motorway | no | x | x |
| motorway_link | no | x | x |
| highway | oneway | forw | backw | # |
| motorway | no | x | x | |
| motorway_link | no | x | x | |
| motorway_link | yes | x | | |
| motorway_link | | x | x | does not imply onway |

Scenario: Car - Around the Block
Given the node map
Expand Down
88 changes: 44 additions & 44 deletions features/guidance/motorway.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Feature: Motorway Guidance
| | | | f | g |

And the ways
| nodes | highway |
| abcde | motorway |
| bfg | motorway_link |
| nodes | highway | oneway |
| abcde | motorway | |
| bfg | motorway_link | yes |

When I route I should get
| waypoints | route | turns |
Expand All @@ -27,9 +27,9 @@ Feature: Motorway Guidance
| | | | g | e |

And the ways
| nodes | highway |
| abcde | motorway |
| bfg | motorway_link |
| nodes | highway | oneway |
| abcde | motorway | |
| bfg | motorway_link | yes |

When I route I should get
| waypoints | route | turns |
Expand All @@ -44,9 +44,9 @@ Feature: Motorway Guidance


And the ways
| nodes | highway |
| abcde | motorway |
| cfg | motorway_link |
| nodes | highway | oneway |
| abcde | motorway | |
| cfg | motorway_link | yes |

When I route I should get
| waypoints | route | turns |
Expand All @@ -60,9 +60,9 @@ Feature: Motorway Guidance
| a | b | c | d | e |

And the ways
| nodes | highway |
| abcde | motorway |
| bfg | motorway_link |
| nodes | highway | oneway |
| abcde | motorway | |
| bfg | motorway_link | yes |

When I route I should get
| waypoints | route | turns |
Expand All @@ -76,9 +76,9 @@ Feature: Motorway Guidance
| a | b | c | | |

And the ways
| nodes | highway |
| abcde | motorway |
| bfg | motorway_link |
| nodes | highway | oneway |
| abcde | motorway | |
| bfg | motorway_link | yes |

When I route I should get
| waypoints | route | turns |
Expand All @@ -92,9 +92,9 @@ Feature: Motorway Guidance
| | | | | e |

And the ways
| nodes | highway |
| abcde | motorway |
| cfg | motorway_link |
| nodes | highway | oneway |
| abcde | motorway | |
| cfg | motorway_link | yes |

When I route I should get
| waypoints | route | turns |
Expand All @@ -107,9 +107,9 @@ Feature: Motorway Guidance
| f | g | | | |

And the ways
| nodes | highway |
| abcde | motorway |
| fgd | motorway_link |
| nodes | highway | oneway |
| abcde | motorway | |
| fgd | motorway_link | yes |

When I route I should get
| waypoints | route | turns |
Expand All @@ -122,9 +122,9 @@ Feature: Motorway Guidance
| a | b | c | d | e |

And the ways
| nodes | highway |
| abcde | motorway |
| fgd | motorway_link |
| nodes | highway | oneway |
| abcde | motorway | |
| fgd | motorway_link | yes |

When I route I should get
| waypoints | route | turns |
Expand Down Expand Up @@ -154,10 +154,10 @@ Feature: Motorway Guidance
| | | | | f | g |

And the ways
| nodes | highway |
| abc | motorway_link |
| cde | motorway |
| cfg | motorway |
| nodes | highway | oneway |
| abc | motorway_link | yes |
| cde | motorway | |
| cfg | motorway | |

When I route I should get
| waypoints | route | turns |
Expand All @@ -170,35 +170,35 @@ Feature: Motorway Guidance
| f | g | | | | h | i |

And the ways
| nodes | highway |
| abcde | motorway |
| fgc | motorway_link |
| chi | motorway_link |
| nodes | highway | oneway |
| abcde | motorway | |
| fgc | motorway_link | yes |
| chi | motorway_link | yes |

When I route I should get
| waypoints | route | turns |
| a,e | abcde,abcde | depart,arrive |
| f,e | fgc,abcde,abcde | depart,merge slight left,arrive |
| waypoints | route | turns |
| a,e | abcde,abcde | depart,arrive |
| f,e | fgc,abcde,abcde | depart,merge slight left,arrive |
| a,i | abcde,chi,chi | depart,off ramp slight right,arrive |
| f,i | fgc,chi,chi | depart,off ramp right,arrive |
| f,i | fgc,chi,chi | depart,off ramp right,arrive |

Scenario: On And Off Ramp Left
Given the node map
| f | g | | | | h | i |
| a | b | | c | | d | e |

And the ways
| nodes | highway |
| abcde | motorway |
| fgc | motorway_link |
| chi | motorway_link |
| nodes | highway | oneway |
| abcde | motorway | |
| fgc | motorway_link | yes |
| chi | motorway_link | yes |

When I route I should get
| waypoints | route | turns |
| a,e | abcde,abcde | depart,arrive |
| f,e | fgc,abcde,abcde | depart,merge slight right,arrive |
| waypoints | route | turns |
| a,e | abcde,abcde | depart,arrive |
| f,e | fgc,abcde,abcde | depart,merge slight right,arrive |
| a,i | abcde,chi,chi | depart,off ramp slight left,arrive |
| f,i | fgc,chi,chi | depart,off ramp left,arrive |
| f,i | fgc,chi,chi | depart,off ramp left,arrive |

Scenario: Merging Motorways
Given the node map
Expand Down
2 changes: 1 addition & 1 deletion profiles/bicycle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ function way_function (way, result)

-- direction
local impliedOneway = false
if junction == "roundabout" or highway == "mini_roundabout" or highway == "motorway_link" or highway == "motorway" then
if junction == "roundabout" or highway == "mini_roundabout" or highway == "motorway" then
impliedOneway = true
end

Expand Down
1 change: 0 additions & 1 deletion profiles/car.lua
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ function way_function (way, result)
oneway == "true" or
junction == "roundabout" or
highway == "mini_roundabout" or
(highway == "motorway_link" and oneway ~="no") or
(highway == "motorway" and oneway ~= "no") then
result.backward_mode = mode.inaccessible

Expand Down