2 Feature: Import of postcodes
3 Tests for postcode estimation
5 Scenario: Postcodes on the object are preferred over those on the address
6 Given the scene admin-areas
8 | osm | class | type | admin | addr+postcode | geometry |
9 | R1 | boundary | administrative | 6 | 112 | :b0 |
10 | R34 | boundary | administrative | 8 | 112 DE | :b1:E |
11 | R4 | boundary | administrative | 10 | 112 DE 34 | :b2:N |
13 | osm | class | type | addr+postcode | geometry |
14 | W93 | highway | residential | 112 DE 344 | :w2N |
15 | W22 | building | yes | 112 DE 344N | :building:w2N |
25 Scenario: Postcodes from a road are inherited by an attached building
26 Given the scene admin-areas
28 | osm | class | type | addr+postcode | geometry |
29 | W93 | highway | residential | 86034 | :w2N |
31 | osm | class | type | geometry |
32 | W22 | building | yes | :building:w2N |
35 | object | postcode | parent_place_id |
38 Scenario: Postcodes from the lowest admin area are inherited by ways
39 Given the scene admin-areas
41 | osm | class | type | admin | addr+postcode | geometry |
42 | R1 | boundary | administrative | 6 | 112 | :b0 |
43 | R34 | boundary | administrative | 8 | 112 DE | :b1:E |
44 | R4 | boundary | administrative | 10 | 112 DE 34 | :b2:N |
46 | osm | class | type | geometry |
47 | W93 | highway | residential | :w2N |
53 Scenario: Postcodes from the lowest admin area with postcode are inherited by ways
54 Given the scene admin-areas
56 | osm | class | type | admin | addr+postcode | geometry |
57 | R1 | boundary | administrative | 6 | 112 | :b0 |
58 | R34 | boundary | administrative | 8 | 112 DE | :b1:E |
60 | osm | class | type | admin | geometry |
61 | R4 | boundary | administrative | 10 | :b2:N |
63 | osm | class | type | geometry |
64 | W93 | highway | residential | :w2N |
67 | object | postcode | parent_place_id |
70 Scenario: Postcodes from the lowest admin area are inherited by buildings
71 Given the scene admin-areas
73 | osm | class | type | admin | addr+postcode | geometry |
74 | R1 | boundary | administrative | 6 | 112 | :b0 |
75 | R34 | boundary | administrative | 8 | 112 DE | :b1:E |
76 | R4 | boundary | administrative | 10 | 112 DE 34 | :b2:N |
78 | osm | class | type | geometry |
79 | W22 | building | yes | :building:w2N |
85 Scenario: Roads get postcodes from nearby buildings without other info
86 Given the scene admin-areas
88 | osm | class | type | geometry |
89 | W93 | highway | residential | :w2N |
91 | osm | class | type | addr+postcode | geometry |
92 | W22 | building | yes | 445023 | :building:w2N |
98 Scenario: Postcodes from admin boundaries are preferred over estimated postcodes
99 Given the scene admin-areas
101 | osm | class | type | admin | addr+postcode | geometry |
102 | R1 | boundary | administrative | 6 | 112 | :b0 |
103 | R34 | boundary | administrative | 8 | 112 DE | :b1:E |
104 | R4 | boundary | administrative | 10 | 112 DE 34 | :b2:N |
106 | osm | class | type | geometry |
107 | W93 | highway | residential | :w2N |
109 | osm | class | type | addr+postcode | geometry |
110 | W22 | building | yes | 445023 | :building:w2N |
113 | object | postcode |