2 Feature: Address computation
3 Tests for filling of place_addressline
6 Scenario: Roads crossing boundaries should contain both states
12 | osm | class | type | geometry |
13 | W1 | highway | road | 7, 8 |
15 | osm | class | type | admin | geometry |
16 | W10 | boundary | administrative | 5 | (1, 2, 5, 4, 1) |
17 | W11 | boundary | administrative | 5 | (2, 3, 6, 5, 2) |
19 Then place_addressline contains
20 | object | address | cached_rank_address |
25 Scenario: Roads following a boundary should contain both states
31 | osm | class | type | geometry |
32 | W1 | highway | road | 2, 7, 8 |
34 | osm | class | type | admin | geometry |
35 | W10 | boundary | administrative | 5 | (1, 2, 5, 4, 1) |
36 | W11 | boundary | administrative | 5 | (2, 3, 6, 5, 2) |
38 Then place_addressline contains
39 | object | address | cached_rank_address |
43 Scenario: Roads should not contain boundaries they touch in a end point
49 | osm | class | type | geometry |
50 | W1 | highway | road | 7, 8 |
52 | osm | class | type | admin | geometry |
53 | W10 | boundary | administrative | 5 | (1, 2, 8, 5, 4, 1) |
54 | W11 | boundary | administrative | 5 | (2, 3, 6, 5, 8, 2) |
56 Then place_addressline contains
57 | object | address | cached_rank_address |
59 Then place_addressline doesn't contain
63 Scenario: Roads should not contain boundaries they touch in a end point
69 | osm | class | type | geometry |
70 | W1 | highway | road | 7, 8, 9 |
72 | osm | class | type | admin | geometry |
73 | W10 | boundary | administrative | 5 | (1, 2, 8, 5, 4, 1) |
74 | W11 | boundary | administrative | 5 | (2, 3, 6, 5, 8, 2) |
76 Then place_addressline contains
77 | object | address | cached_rank_address |
79 Then place_addressline doesn't contain
83 Scenario: Locality points should contain all boundaries they touch
89 | osm | class | type | geometry |
90 | N1 | place | locality | 8 |
92 | osm | class | type | admin | geometry |
93 | W10 | boundary | administrative | 5 | (1, 2, 8, 5, 4, 1) |
94 | W11 | boundary | administrative | 5 | (2, 3, 6, 5, 8, 2) |
96 Then place_addressline contains
97 | object | address | cached_rank_address |
101 Scenario: Areas should not contain boundaries they touch
107 | osm | class | type | geometry |
108 | W1 | landuse | industrial | (1, 2, 5, 4, 1) |
110 | osm | class | type | admin | geometry |
111 | W10 | boundary | administrative | 5 | (2, 3, 6, 5, 2) |
113 Then place_addressline doesn't contain
117 Scenario: buildings with only addr:postcodes do not appear in the address of a way
118 Given the scene admin-areas
120 | osm | class | type | admin | addr+postcode | geometry |
121 | R1 | boundary | administrative | 6 | 112 | :b0 |
122 | R34 | boundary | administrative | 8 | 112 DE | :b1:E |
123 | R4 | boundary | administrative | 10 | 112 DE 34 | :b2:N |
125 | osm | class | type | geometry |
126 | W93 | highway | residential | :w2N |
128 | osm | class | type | addr+postcode | geometry |
129 | W22 | place | postcode | 445023 | :building:w2N |
131 Then place_addressline doesn't contain
135 Scenario: postcode boundaries do appear in the address of a way
136 Given the scene admin-areas
138 | osm | class | type | admin | addr+postcode | geometry |
139 | R1 | boundary | administrative | 6 | 112 | :b0 |
140 | R34 | boundary | administrative | 8 | 112 DE | :b1:E |
142 | osm | class | type | addr+postcode | geometry |
143 | R4 | place | postcode | 112 DE 34 | :b2:N |
145 | osm | class | type | geometry |
146 | W93 | highway | residential | :w2N |
148 | osm | class | type | addr+postcode | geometry |
149 | W22 | place | postcode | 445023 | :building:w2N |
151 Then place_addressline contains