]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/db/import/addressing.feature
test: make road really cross the boundary
[nominatim.git] / test / bdd / db / import / addressing.feature
1 @DB
2 Feature: Address computation
3     Tests for filling of place_addressline
4
5     # github #121
6     Scenario: Roads crossing boundaries should contain both states
7         Given the grid
8             | 1 |   |   | 2 |   | 3 |
9             |   | 7 |   |   | 8 |   |
10             | 4 |   |   | 5 |   | 6 |
11         And the named places
12             | osm | class   | type | geometry |
13             | W1  | highway | road | 7, 8     |
14         And the named places
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) |
18         When importing
19         Then place_addressline contains
20             | object | address | cached_rank_address |
21             | W1     | W10     | 10                  |
22             | W1     | W11     | 10                  |
23
24     Scenario: buildings with only addr:postcodes do not appear in the address of a way
25         Given the scene admin-areas
26         And the named places
27             | osm | class    | type           | admin | addr+postcode | geometry |
28             | R1  | boundary | administrative | 6     | 112           | :b0      |
29             | R34 | boundary | administrative | 8     | 112 DE        | :b1:E    |
30             | R4  | boundary | administrative | 10    | 112 DE 34     | :b2:N    |
31         And the named places
32             | osm | class    | type           | geometry |
33             | W93 | highway  | residential    | :w2N     |
34         And the places
35             | osm | class    | type        | addr+postcode | geometry |
36             | W22 | place    | postcode    | 445023        | :building:w2N |
37         When importing
38         Then place_addressline doesn't contain
39             | object | address  |
40             | W93    | W22      |
41
42     Scenario: postcode boundaries do appear in the address of a way
43         Given the scene admin-areas
44         And the named places
45             | osm | class    | type           | admin | addr+postcode | geometry |
46             | R1  | boundary | administrative | 6     | 112           | :b0      |
47             | R34 | boundary | administrative | 8     | 112 DE        | :b1:E    |
48         And the places
49             | osm | class    | type      | addr+postcode | geometry |
50             | R4  | place    | postcode  | 112 DE 34     | :b2:N    |
51         And the named places
52             | osm | class    | type           | geometry |
53             | W93 | highway  | residential    | :w2N     |
54         And the places
55             | osm | class    | type        | addr+postcode | geometry |
56             | W22 | place    | postcode    | 445023        | :building:w2N |
57         When importing
58         Then place_addressline contains
59             | object | address |
60             | W93    | R4      |