]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/osm2pgsql/update/simple.feature
add typing information to DB properties
[nominatim.git] / test / bdd / osm2pgsql / update / simple.feature
1 @DB
2 Feature: Update of simple objects by osm2pgsql
3     Testing basic update functions of osm2pgsql.
4
5     Scenario: Import object with two main tags
6         When loading osm data
7           """
8           n1 Ttourism=hotel,amenity=restaurant,name=foo
9           n2 Tplace=locality,name=spotty
10           """
11         Then place contains
12           | object     | type       | name+name |
13           | N1:tourism | hotel      | foo |
14           | N1:amenity | restaurant | foo |
15           | N2:place   | locality   | spotty |
16         When updating osm data
17           """
18           n1 dV Ttourism=hotel,name=foo
19           n2 dD
20           """
21         Then place has no entry for N1:amenity
22         And place has no entry for N2
23         And place contains
24           | object     | class   | type       | name |
25           | N1:tourism | tourism | hotel      | 'name' : 'foo' |
26
27     Scenario: Downgrading a highway to one that is dropped without name
28         When loading osm data
29           """
30           n100 x0 y0
31           n101 x0.0001 y0.0001
32           w1 Thighway=residential Nn100,n101
33           """
34         Then place contains
35           | object     |
36           | W1:highway |
37         When updating osm data
38           """
39           w1 Thighway=service Nn100,n101
40           """
41         Then place has no entry for W1
42
43     Scenario: Downgrading a highway when a second tag is present
44         When loading osm data
45           """
46           n100 x0 y0
47           n101 x0.0001 y0.0001
48           w1 Thighway=residential,tourism=hotel Nn100,n101
49           """
50         Then place contains
51           | object     |
52           | W1:highway |
53           | W1:tourism |
54         When updating osm data
55           """
56           w1 Thighway=service,tourism=hotel Nn100,n101
57           """
58         Then place has no entry for W1:highway
59         And place contains
60           | object     |
61           | W1:tourism |