]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/features/osm2pgsql/update/interpolations.feature
prepare release 5.2.0.post15
[nominatim.git] / test / bdd / features / osm2pgsql / update / interpolations.feature
1 Feature: Updates of address interpolation objects
2     Test that changes to address interpolation objects are correctly
3     propagated.
4
5     Background:
6         Given the grid
7             | 1 | 2 |
8
9
10     Scenario: Adding a new interpolation
11         When loading osm data
12             """
13             n1 Taddr:housenumber=3
14             n2 Taddr:housenumber=17
15             w33 Thighway=residential,name=Tao Nn1,n2
16             """
17         Then place contains exactly
18             | object | class | type   |
19             | N1     | place | house  |
20             | N2     | place | house  |
21             | W33    | highway | residential |
22
23         When updating osm data
24             """
25             w99 Taddr:interpolation=odd Nn1,n2
26             """
27         Then place contains exactly
28             | object | class | type   |
29             | N1     | place | house  |
30             | N2     | place | house  |
31             | W33    | highway | residential |
32         And place_interpolation contains exactly
33             | osm_id | type |
34             | 99     | odd  |
35         When indexing
36         Then placex contains exactly
37             | object | class   | type   |
38             | N1     | place   | house  |
39             | N2     | place   | house  |
40             | W33    | highway | residential |
41         Then location_property_osmline contains exactly
42             | osm_id | startnumber |
43             | 99     | 5           |
44
45
46     Scenario: Delete an existing interpolation
47         When loading osm data
48             """
49             n1 Taddr:housenumber=2
50             n2 Taddr:housenumber=7
51             w99 Taddr:interpolation=odd Nn1,n2
52             """
53         Then place contains exactly
54             | object | class | type   |
55             | N1     | place | house  |
56             | N2     | place | house  |
57         And place_interpolation contains exactly
58             | osm_id | type |
59             | 99     | odd  |
60
61         When updating osm data
62             """
63             w99 v2 dD
64             """
65         Then place contains
66             | object | class | type   |
67             | N1     | place | house  |
68             | N2     | place | house  |
69         And place_interpolation contains exactly
70             | osm_id |
71         When indexing
72         Then placex contains exactly
73             | object | class | type   |
74             | N1     | place | house  |
75             | N2     | place | house  |
76         Then location_property_osmline contains exactly
77             | osm_id |
78
79
80     Scenario: Changing an object to an interpolation
81         When loading osm data
82             """
83             n1 Taddr:housenumber=3
84             n2 Taddr:housenumber=17
85             w33 Thighway=residential Nn1,n2
86             w99 Thighway=residential Nn1,n2
87             """
88         Then place contains exactly
89             | object | class   | type   |
90             | N1     | place   | house  |
91             | N2     | place   | house  |
92             | W33    | highway | residential  |
93             | W99    | highway | residential  |
94         And place_interpolation contains exactly
95             | osm_id |
96
97         When updating osm data
98             """
99             w99 Taddr:interpolation=odd Nn1,n2
100             """
101         Then place contains exactly
102             | object | class | type   |
103             | N1     | place | house  |
104             | N2     | place | house  |
105             | W33    | highway | residential  |
106         And place_interpolation contains exactly
107             | osm_id | type |
108             | 99     | odd  |
109         When indexing
110         Then placex contains exactly
111             | object | class   | type   |
112             | N1     | place   | house  |
113             | N2     | place   | house  |
114             | W33    | highway | residential |
115         And location_property_osmline contains exactly
116             | osm_id | startnumber |
117             | 99     | 5           |
118
119
120     Scenario: Changing an interpolation to something else
121         When loading osm data
122             """
123             n1 Taddr:housenumber=3
124             n2 Taddr:housenumber=17
125             w99 Taddr:interpolation=odd Nn1,n2
126             """
127         Then place contains exactly
128             | object | class | type   |
129             | N1     | place | house  |
130             | N2     | place | house  |
131         And place_interpolation contains exactly
132             | osm_id | type |
133             | 99     | odd  |
134
135         When updating osm data
136             """
137             w99 Thighway=residential Nn1,n2
138             """
139         Then place contains
140             | object | class   | type   |
141             | N1     | place   | house  |
142             | N2     | place   | house  |
143             | W99    | highway | residential  |
144         And place_interpolation contains exactly
145             | osm_id |
146         When indexing
147         Then placex contains exactly
148             | object | class   | type   |
149             | N1     | place   | house  |
150             | N2     | place   | house  |
151             | W99    | highway | residential  |
152         And location_property_osmline contains exactly
153             | osm_id |