]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/features/osm2pgsql/update/relation.feature
release 5.1.0.post6
[nominatim.git] / test / bdd / features / osm2pgsql / update / relation.feature
1 Feature: Update of relations by osm2pgsql
2     Testing relation update by osm2pgsql.
3
4     Scenario: Remove all members of a relation
5         When loading osm data
6           """
7           n1 Tamenity=prison,name=foo
8           n200 x0 y0
9           n201 x0 y0.0001
10           n202 x0.0001 y0.0001
11           n203 x0.0001 y0
12           w2 Tref=45' Nn200,n201,n202,n203,n200
13           r1 Ttype=multipolygon,tourism=hotel,name=XZ Mw2@
14           """
15         Then place contains
16           | object | class   | type   | name!dict |
17           | R1     | tourism | hotel  | 'name' : 'XZ' |
18           When updating osm data
19             """
20             r1 Ttype=multipolygon,tourism=hotel,name=XZ Mn1@
21             """
22         Then place has no entry for R1
23
24
25     Scenario: Change type of a relation
26         When loading osm data
27           """
28           n200 x0 y0
29           n201 x0 y0.0001
30           n202 x0.0001 y0.0001
31           n203 x0.0001 y0
32           w2 Tref=45 Nn200,n201,n202,n203,n200
33           r1 Ttype=multipolygon,tourism=hotel,name=XZ Mw2@
34           """
35         Then place contains
36           | object | class   | type   | name!dict |
37           | R1     | tourism | hotel  | 'name' : 'XZ' |
38         When updating osm data
39           """
40           r1 Ttype=multipolygon,amenity=prison,name=XZ Mw2@
41           """
42         Then place has no entry for R1:tourism
43         And place contains
44           | object | class   | type   | name!dict |
45           | R1     | amenity | prison | 'name' : 'XZ' |
46
47     Scenario: Change name of a relation
48         When loading osm data
49           """
50           n200 x0 y0
51           n201 x0 y0.0001
52           n202 x0.0001 y0.0001
53           n203 x0.0001 y0
54           w2 Tref=45 Nn200,n201,n202,n203,n200
55           r1 Ttype=multipolygon,tourism=hotel,name=AB Mw2@
56           """
57         Then place contains
58           | object | class   | type   | name!dict |
59           | R1     | tourism | hotel  | 'name' : 'AB' |
60         When updating osm data
61           """
62           r1 Ttype=multipolygon,tourism=hotel,name=XY Mw2@
63           """
64         Then place contains
65           | object | class   | type   | name!dict |
66           | R1     | tourism | hotel  | 'name' : 'XY' |
67
68     Scenario: Change type of a relation into something unknown
69         When loading osm data
70           """
71           n200 x0 y0
72           n201 x0 y0.0001
73           n202 x0.0001 y0.0001
74           n203 x0.0001 y0
75           w2 Tref=45 Nn200,n201,n202,n203,n200
76           r1 Ttype=multipolygon,tourism=hotel,name=XY Mw2@
77           """
78         Then place contains
79           | object | class   | type   | name!dict |
80           | R1     | tourism | hotel  | 'name' : 'XY' |
81         When updating osm data
82           """
83           r1 Ttype=multipolygon,amenities=prison,name=XY Mw2@
84           """
85         Then place has no entry for R1
86
87     Scenario: Type tag is removed
88         When loading osm data
89           """
90           n200 x0 y0
91           n201 x0 y0.0001
92           n202 x0.0001 y0.0001
93           n203 x0.0001 y0
94           w2 Tref=45 Nn200,n201,n202,n203,n200
95           r1 Ttype=multipolygon,tourism=hotel,name=XY Mw2@
96           """
97         Then place contains
98           | object | class   | type   | name!dict |
99           | R1     | tourism | hotel  | 'name' : 'XY' |
100         When updating osm data
101           """
102           r1 Ttourism=hotel,name=XY Mw2@
103           """
104         Then place has no entry for R1
105
106     Scenario: Type tag is renamed to something unknown
107         When loading osm data
108           """
109           n200 x0 y0
110           n201 x0 y0.0001
111           n202 x0.0001 y0.0001
112           n203 x0.0001 y0
113           w2 Tref=45 Nn200,n201,n202,n203,n200
114           r1 Ttype=multipolygon,tourism=hotel,name=XY Mw2@
115           """
116         Then place contains
117           | object | class   | type   | name!dict |
118           | R1     | tourism | hotel  | 'name' : 'XY' |
119         When updating osm data
120           """
121           r1 Ttype=multipolygonn,tourism=hotel,name=XY Mw2@
122           """
123         Then place has no entry for R1
124
125     Scenario: Country boundary names are left untouched when country_code unknown
126         When loading osm data
127           """
128           n200 Tamenity=prison x0 y0
129           n201 x0 y0.0001
130           n202 x0.0001 y0.0001
131           n203 x0.0001 y0
132           """
133         And updating osm data
134           """
135           w1 Nn200,n201,n202,n203,n200
136           r1 Ttype=boundary,boundary=administrative,name=Foo,country_code=XX,admin_level=2 Mw1@
137           """
138         Then place contains
139           | object | address+country | name!dict      |
140           | R1     | XX              | 'name' : 'Foo' |