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