@@ -3,66 +3,230 @@ Feature: Car - route relations
33 Background :
44 Given the profile "car"
55
6- @sliproads
7- Scenario : Cardinal direction assignment to refs
6+ Scenario : Assignment using relation membership roles
87 Given the node map
98 """
10- a b
11- | |
12- c------+--+------d
13- e------+--+------f
14- | |
15- g h
9+ a----------------b
10+ c----------------d
11+ """
1612
17- i----------------j
18- k----------------l
13+ And the ways
14+ | nodes | name | highway | ref |
15+ | ba | westbound | motorway | I 80 |
16+ | cd | eastbound | motorway | I 80 ;CO 93 |
1917
20- x----------------y
21- z----------------w
18+ And the relations
19+ | type | way :east | way :west | route | ref | network |
20+ | route | cd | ba | road | 80 | US :I |
21+ | route | cd | ba | road | 93 | US :CO |
22+
23+
24+ When I route I should get
25+ | waypoints | route | ref |
26+ | b ,a | westbound ,westbound | I 80 $west ,I 80 $west |
27+ | c ,d | eastbound ,eastbound | I 80 $east ; CO 93 $east ,I 80 $east ; CO 93 $east |
28+
29+ Scenario : Assignment using relation direction property (no role on members)
30+ Given the node map
31+ """
32+ a----------------b
33+ c----------------d
2234 """
2335
2436 And the ways
2537 | nodes | name | highway | ref |
26- | ag | southbound | motorway | I 80 |
27- | hb | northbound | motorway | I 80 |
28- | dc | westbound | motorway | I 85 ;CO 93 |
29- | ef | eastbound | motorway | I 85 ;US 12 |
30- | ij | westbound -2 | motorway | I 99 |
31- | ji | eastbound -2 | motorway | I 99 |
32- | kl | eastbound -2 | motorway | I 99 |
33- | lk | eastbound -2 | motorway | I 99 |
34- | xy | watermill | motorway | I 45M ; US 3 |
38+ | ba | westbound | motorway | I 80 |
39+ | cd | eastbound | motorway | I 80 ;CO 93 |
3540
3641 And the relations
37- | type | way :south | route | ref |
38- | route | ag | road | 80 |
39- | route | ef | road | 12 |
42+ | type | direction | way | route | ref | network |
43+ | route | west | ba | road | 80 | US :I |
44+ | route | east | cd | road | 80 | US :I |
45+ | route | east | cd | road | 93 | US :CO |
46+
47+ When I route I should get
48+ | waypoints | route | ref |
49+ | b ,a | westbound ,westbound | I 80 $west ,I 80 $west |
50+ | c ,d | eastbound ,eastbound | I 80 $east ; CO 93 $east ,I 80 $east ; CO 93 $east |
51+
52+
53+ Scenario : Forward assignment on one-way roads using relation direction property
54+ Given the node map
55+ """
56+ a----------------b
57+ c----------------d
58+ """
59+
60+ And the ways
61+ | nodes | name | highway | ref |
62+ | ba | westbound | motorway | I 80 |
63+ | cd | eastbound | motorway | I 80 ;CO 93 |
4064
4165 And the relations
42- | type | way :north | route | ref |
43- | route | hb | road | 80 |
44- | route | cd | road | 93 |
66+ | type | direction | way :forward | route | ref | network |
67+ | route | west | ba | road | 80 | US :I |
68+ | route | east | cd | road | 80 | US :I |
69+ | route | east | cd | road | 93 | US :CO |
70+
71+ When I route I should get
72+ | waypoints | route | ref |
73+ | b ,a | westbound ,westbound | I 80 $west ,I 80 $west |
74+ | c ,d | eastbound ,eastbound | I 80 $east ; CO 93 $east ,I 80 $east ; CO 93 $east |
75+
76+
77+ Scenario : Forward/backward assignment on non-divided roads with role direction tag
78+ Given the node map
79+ """
80+ a----------------b
81+ """
82+
83+ And the ways
84+ | nodes | name | highway | ref | oneway |
85+ | ab | mainroad | motorway | I 80 | no |
86+
87+ And the relations
88+ | type | direction | way :forward | route | ref | network |
89+ | route | west | ab | road | 80 | US :I |
90+
91+ And the relations
92+ | type | direction | way :backward | route | ref | network |
93+ | route | east | ab | road | 80 | US :I |
94+
95+ When I route I should get
96+ | waypoints | route | ref |
97+ | b ,a | mainroad ,mainroad | I 80 $west ,I 80 $west |
98+ | a ,b | mainroad ,mainroad | I 80 $east ,I 80 $east |
99+
100+
101+ Scenario : Conflict between role and direction
102+ Given the node map
103+ """
104+ a----------------b
105+ """
106+
107+ And the ways
108+ | nodes | name | highway | ref |
109+ | ab | eastbound | motorway | I 80 |
110+
111+ And the relations
112+ | type | direction | way :east | route | ref | network |
113+ | route | west | ab | road | 80 | US :I |
114+
115+ When I route I should get
116+ | waypoints | route | ref |
117+ | a ,b | eastbound ,eastbound | I 80 ,I 80 |
118+
119+
120+ Scenario : Conflict between role and superrelation direction
121+ Given the node map
122+ """
123+ a----------------b
124+ """
125+
126+ And the ways
127+ | nodes | name | highway | ref |
128+ | ab | eastbound | motorway | I 80 |
129+
130+ And the relations
131+ | type | way :east | route | ref | network | name |
132+ | route | ab | road | 80 | US :I | baserelation |
133+
134+ And the relations
135+ | type | direction | relation | route | ref | network | name |
136+ | route | east | baserelation | road | 80 | US :I | superrelation |
137+
138+ When I route I should get
139+ | waypoints | route | ref |
140+ | a ,b | eastbound ,eastbound | I 80 ,I 80 |
141+
142+ Scenario : Conflict between role and superrelation role
143+ Given the node map
144+ """
145+ a----------------b
146+ """
147+
148+ And the ways
149+ | nodes | name | highway | ref |
150+ | ab | eastbound | motorway | I 80 |
151+
152+ And the relations
153+ | type | way :east | route | ref | network | name |
154+ | route | ab | road | 80 | US :I | baserelation |
155+
156+ And the relations
157+ | type | relation :west | route | ref | network | name |
158+ | route | baserelation | road | 80 | US :I | superrelation |
159+
160+ When I route I should get
161+ | waypoints | route | ref |
162+ | a ,b | eastbound ,eastbound | I 80 ,I 80 |
163+
164+ Scenario : Direction only available via superrelation role
165+ Given the node map
166+ """
167+ a----------------b
168+ """
169+
170+ And the ways
171+ | nodes | name | highway | ref |
172+ | ab | eastbound | motorway | I 80 |
173+
174+ And the relations
175+ | type | way :forward | route | ref | network | name |
176+ | route | ab | road | 80 | US :I | baserelation |
177+
178+ And the relations
179+ | type | relation :east | route | ref | network | name |
180+ | route | baserelation | road | 80 | US :I | superrelation |
181+
182+ When I route I should get
183+ | waypoints | route | ref |
184+ | a ,b | eastbound ,eastbound | I 80 $east ,I 80 $east |
185+
186+ Scenario : Direction only available via superrelation direction
187+ Given the node map
188+ """
189+ a----------------b
190+ """
191+
192+ And the ways
193+ | nodes | name | highway | ref |
194+ | ab | eastbound | motorway | I 80 |
195+
196+ And the relations
197+ | type | way :forward | route | ref | network | name |
198+ | route | ab | road | 80 | US :I | baserelation |
199+
200+ And the relations
201+ | type | direction | relation | route | ref | network | name |
202+ | route | east | baserelation | road | 80 | US :I | superrelation |
203+
204+ When I route I should get
205+ | waypoints | route | ref |
206+ | a ,b | eastbound ,eastbound | I 80 $east ,I 80 $east |
207+
208+ Scenario : Three levels of indirection
209+ Given the node map
210+ """
211+ a----------------b
212+ """
213+
214+ And the ways
215+ | nodes | name | highway | ref |
216+ | ab | eastbound | motorway | I 80 |
45217
46218 And the relations
47- | type | way :west | route | ref |
48- | route | dc | road | 85 |
49- | route | ij | road | 99 |
50- | route | xy | road | I 45 |
219+ | type | way :forward | route | ref | network | name |
220+ | route | ab | road | 80 | US :I | baserelation |
51221
52222 And the relations
53- | type | way : east | route | ref |
54- | route | lk | road | I 99 |
223+ | type | relation | route | ref | network | name |
224+ | route | baserelation | road | 80 | US : I | superrelation1 |
55225
56226 And the relations
57- | type | way : east | route | ref |
58- | route | xy | road | US 3 |
227+ | type | direction | relation | route | ref | network | name |
228+ | route | east | superrelation1 | road | 80 | US : I | superrelation2 |
59229
60230 When I route I should get
61- | waypoints | route | ref |
62- | a ,g | southbound ,southbound | I 80 $south ,I 80 $south |
63- | h ,b | northbound ,northbound | I 80 $north ,I 80 $north |
64- | d ,c | westbound ,westbound | I 85 $west ; CO 93 $north ,I 85 $west ; CO 93 $north |
65- | e ,f | eastbound ,eastbound | I 85 ; US 12 $south ,I 85 ; US 12 $south |
66- | i ,j | westbound -2 ,westbound -2 | I 99 $west ,I 99 $west |
67- | l ,k | eastbound -2 ,eastbound -2 | I 99 $east ,I 99 $east |
68- | x ,y | watermill ,watermill | I 45M $west ; US 3 $east ,I 45M $west ; US 3 $east |
231+ | waypoints | route | ref |
232+ | a ,b | eastbound ,eastbound | I 80 $east ,I 80 $east |
0 commit comments