actually calculate distance instead of using .distance which is a timing value

This commit is contained in:
Moritz Kobitzsch
2016-10-20 12:15:36 +02:00
parent 5e167b8745
commit ecee13bffa
11 changed files with 111 additions and 6 deletions
+1
View File
@@ -3,6 +3,7 @@ Feature: Car - Street names in instructions
Background:
Given the profile "car"
Given a grid size of 5 meters
Scenario: Car - A named street
Given the node map
@@ -34,6 +34,36 @@ Feature: Slipways and Dedicated Turn Lanes
| a,g | first,second,second | depart,turn right,arrive |
| a,1 | first,, | depart,turn slight right,arrive |
Scenario: Turn Instead of Ramp - Max-Speed
Given the node map
"""
e
a-b-----c-d
`h |
||
1||
`|
f
|
g
"""
And the ways
| nodes | highway | name | maxspeed |
| abcd | trunk | first | 70 |
| bhf | trunk_link | | 2 |
| ecfg | primary | second | 50 |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | abcd | ecfg | c | no_right_turn |
When I route I should get
| waypoints | route | turns |
| a,g | first,second,second | depart,turn right,arrive |
| a,1 | first,, | depart,turn slight right,arrive |
Scenario: Turn Instead of Ramp
Given the node map
"""
+26 -3
View File
@@ -511,7 +511,7 @@ Feature: Turn Lane Guidance
g
c
a b d e
a b d e
f
"""
@@ -523,8 +523,8 @@ Feature: Turn Lane Guidance
| bc | road | left\|left | yes | primary |
| de | road | | yes | primary |
| fd | cross | | | secondary |
| dc | cross | | | secondary |
| cg | cross | | | secondary |
| dc | cross | | | secondary |
| cg | cross | | | secondary |
And the relations
| type | way:from | way:to | node:via | restriction |
@@ -897,6 +897,29 @@ Feature: Turn Lane Guidance
| x,d | road,road | depart,arrive | , |
@partition-lanes
Scenario: Partitioned turn, Slight Curve - maxspeed
Given the node map
"""
f e
| |
| |
| c
a - b ' |
g d
"""
And the ways
| nodes | name | highway | oneway | turn:lanes:forward | maxspeed |
| ab | road | primary | yes | left\|right | 1 |
| bc | cross | primary | yes | | 1 |
| fbg | cross | primary | yes | | 1 |
| dce | cross | primary | yes | | 1 |
When I route I should get
| waypoints | route | turns | lanes |
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, |
| a,e | road,cross,cross | depart,turn left,arrive | ,left:true right:false, |
Scenario: Partitioned turn, Slight Curve
Given the node map
"""