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