2 Feature: Import of postcodes
3 Tests for postcode estimation
5 Scenario: Postcodes on the object are prefered 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 |
99 Scenario: Postcodes from admin boundaries are preferred over estimated postcodes
100 Given the scene admin-areas
102 | osm | class | type | admin | addr+postcode | geometry |
103 | R1 | boundary | administrative | 6 | 112 | :b0 |
104 | R34 | boundary | administrative | 8 | 112 DE | :b1:E |
105 | R4 | boundary | administrative | 10 | 112 DE 34 | :b2:N |
107 | osm | class | type | geometry |
108 | W93 | highway | residential | :w2N |
110 | osm | class | type | addr+postcode | geometry |
111 | W22 | building | yes | 445023 | :building:w2N |
114 | object | postcode |