]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/osm2pgsql/update/interpolations.feature
simplify weigh_search() function
[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             """
17         Then place contains
18             | object    | type   |
19             | N1:place  | house  |
20             | N2:place  | house  |
21
22         When updating osm data
23             """
24             w99 Taddr:interpolation=odd Nn1,n2
25             """
26         Then place contains
27             | object    | type   |
28             | N1:place  | house  |
29             | N2:place  | house  |
30             | W99:place | houses |
31         When indexing
32         Then placex contains exactly
33             | object    | type   |
34             | N1:place  | house  |
35             | N2:place  | house  |
36         Then location_property_osmline contains exactly
37             | object |
38             | 99:5   |
39
40
41     Scenario: Delete an existing interpolation
42         When loading osm data
43             """
44             n1 Taddr:housenumber=2
45             n2 Taddr:housenumber=7
46             w99 Taddr:interpolation=odd Nn1,n2
47             """
48         Then place contains
49             | object    | type   |
50             | N1:place  | house  |
51             | N2:place  | house  |
52             | W99:place | houses |
53
54         When updating osm data
55             """
56             w99 v2 dD
57             """
58         Then place contains
59             | object    | type   |
60             | N1:place  | house  |
61             | N2:place  | house  |
62         When indexing
63         Then placex contains exactly
64             | object    | type   |
65             | N1:place  | house  |
66             | N2:place  | house  |
67         Then location_property_osmline contains exactly
68             | object | indexed_status |
69
70
71     Scenario: Changing an object to an interpolation
72         When loading osm data
73             """
74             n1 Taddr:housenumber=3
75             n2 Taddr:housenumber=17
76             w99 Thighway=residential Nn1,n2
77             """
78         Then place contains
79             | object      | type   |
80             | N1:place    | house  |
81             | N2:place    | house  |
82             | W99:highway | residential  |
83
84         When updating osm data
85             """
86             w99 Taddr:interpolation=odd Nn1,n2
87             """
88         Then place contains
89             | object    | type   |
90             | N1:place  | house  |
91             | N2:place  | house  |
92             | W99:place | houses |
93         When indexing
94         Then placex contains exactly
95             | object    | type   |
96             | N1:place  | house  |
97             | N2:place  | house  |
98         And location_property_osmline contains exactly
99             | object |
100             | 99:5   |
101
102
103     Scenario: Changing an interpolation to something else
104         When loading osm data
105             """
106             n1 Taddr:housenumber=3
107             n2 Taddr:housenumber=17
108             w99 Taddr:interpolation=odd Nn1,n2
109             """
110         Then place contains
111             | object      | type   |
112             | N1:place    | house  |
113             | N2:place    | house  |
114             | W99:place | houses |
115
116         When updating osm data
117             """
118             w99 Thighway=residential Nn1,n2
119             """
120         Then place contains
121             | object      | type   |
122             | N1:place    | house  |
123             | N2:place    | house  |
124             | W99:highway | residential  |
125         When indexing
126         Then placex contains exactly
127             | object      | type   |
128             | N1:place    | house  |
129             | N2:place    | house  |
130             | W99:highway | residential  |
131         And location_property_osmline contains exactly
132             | object |
133