osrm-backend/features/testbot/bearing_param.feature

120 lines
4.7 KiB
Gherkin
Raw Normal View History

@routing @bearing_param @testbot
2013-08-29 13:29:13 -04:00
Feature: Bearing parameter
2013-03-18 16:26:36 -04:00
2013-08-29 13:29:13 -04:00
Background:
Given the profile "testbot"
And a grid size of 10 meters
Scenario: Testbot - Intial bearing in simple case
Given the node map
2016-09-30 03:33:08 -04:00
"""
a b c d
"""
And the ways
| nodes |
| ad |
When I route I should get
2016-05-13 13:18:00 -04:00
| from | to | bearings | route | bearing |
| b | c | 90 90 | ad,ad | 0->90,90->0|
2016-05-13 13:18:00 -04:00
| b | c | 180 90 | | |
| b | c | 80 100 | ad,ad | 0->90,90->0|
2016-05-13 13:18:00 -04:00
| b | c | 79 100 | | |
| b | c | 79,11 100 | ad,ad | 0->90,90->0|
2013-08-29 13:29:13 -04:00
Scenario: Testbot - Intial bearing in simple case
Given the node map
2016-09-30 03:33:08 -04:00
"""
a
0 c
b
"""
2013-08-29 13:29:13 -04:00
And the ways
| nodes |
| ac |
| bc |
When I route I should get
| from | to | bearings | route | bearing |
| 0 | c | 0 0 | | |
| 0 | c | 45 45 | bc,bc | 0->45,45->0 |
| 0 | c | 85 85 | | |
| 0 | c | 95 95 | | |
| 0 | c | 135 135 | ac,ac | 0->135,135->0 |
| 0 | c | 180 180 | | |
2013-08-29 13:29:13 -04:00
Scenario: Testbot - Initial bearing on split way
Given the node map
2016-09-30 03:33:08 -04:00
"""
2016-11-22 15:08:12 -05:00
g d 2 1 c f
2016-09-30 03:33:08 -04:00
h a 0 b e
"""
2013-03-18 16:26:36 -04:00
2013-08-29 13:29:13 -04:00
And the ways
| nodes | oneway |
| ab | yes |
| bc | yes |
| cd | yes |
| da | yes |
2016-05-30 11:42:28 -04:00
| be | yes |
| fc | yes |
| dg | yes |
| ha | yes |
2013-08-29 13:29:13 -04:00
When I route I should get
| from | to | bearings | route | bearing |
| 0 | b | 10 10 | bc,bc | 0->0,0->0 |
| 0 | b | 90 90 | ab,ab | 0->90,90->0 |
2017-08-28 12:03:51 -04:00
| 0 | b | 170 170 | da,da | 0->180,180->0 |
| 0 | b | 189 189 | da,da | 0->180,180->0 |
| 0 | 1 | 90 270 | ab,cd,cd | 0->90,90->0,270->0 |
| 1 | 2 | 10 10 | bc,bc | 0->0,0->0 |
| 1 | 2 | 90 90 | ab,cd,ab,ab | 0->90,90->0,270->180,90->0 |
| 1 | 0 | 189 189 | da,da | 0->180,180->0 |
| 1 | 2 | 270 270 | cd,cd | 0->270,270->0 |
| 1 | 2 | 349 349 | | |
2013-03-18 16:26:36 -04:00
2013-08-29 13:29:13 -04:00
Scenario: Testbot - Initial bearing in all direction
Given the node map
2016-09-30 03:33:08 -04:00
"""
h q a b
p i j
g o 0 k c
n m l
f e d
"""
2013-03-18 16:26:36 -04:00
2013-08-29 13:29:13 -04:00
And the ways
| nodes | oneway | name |
| ia | yes | ia |
| jb | yes | jb |
| kc | yes | kc |
| ld | yes | ld |
| me | yes | me |
| nf | yes | nf |
| og | yes | og |
| ph | yes | ph |
| ab | yes | ring |
| bc | yes | ring |
| cd | yes | ring |
| de | yes | ring |
| ef | yes | ring |
| fg | yes | ring |
| gh | yes | ring |
| ha | yes | ring |
2013-03-18 16:26:36 -04:00
2013-08-29 13:29:13 -04:00
When I route I should get
| from | to | bearings | route | bearing |
| 0 | q | 0 90 | ia,ring,ring,ring,ring,ring | 0->0,0->90,180->270,270->0,0->90,90->0 |
| 0 | a | 45 90 | jb,ring,ring,ring,ring,ring | 0->45,45->180,180->270,270->0,0->90,90->0 |
| 0 | q | 90 90 | kc,ring,ring,ring,ring | 0->90,90->180,270->0,0->90,90->0 |
| 0 | a | 135 90 | ld,ring,ring,ring,ring | 0->135,135->270,270->0,0->90,90->0 |
| 0 | a | 180 90 | me,ring,ring,ring,ring | 0->180,180->270,270->0,0->90,90->0 |
| 0 | a | 225 90 | nf,ring,ring,ring | 0->225,225->0,0->90,90->0 |
| 0 | a | 270 90 | og,ring,ring,ring | 0->270,270->0,0->90,90->0 |
| 0 | a | 315 90 | ph,ring,ring | 0->315,315->90,90->0 |