]> git.openstreetmap.org Git - nominatim.git/blob - tests/features/db/update/simple.feature
make path to wikipedia files configurable
[nominatim.git] / tests / features / db / update / simple.feature
1 @DB
2 Feature: Update of simple objects
3     Testing simple stuff
4
5     Scenario: Do delete small boundary features
6         Given the place areas
7           | osm_type | osm_id | class    | type           | admin_level | geometry
8           | R        | 1      | boundary | administrative | 3           | (0 0, 1 0, 1 1, 0 1, 0 0)
9         When importing
10         Then table placex contains
11           | object | rank_search
12           | R1     | 6
13         When marking for delete R1
14         Then table placex has no entry for R1
15
16     Scenario: Do not delete large boundary features
17         Given the place areas
18           | osm_type | osm_id | class    | type           | admin_level | geometry
19           | R        | 1      | boundary | administrative | 3           | (0 0, 2 0, 2 2.1, 0 2, 0 0)
20         When importing
21         Then table placex contains
22           | object | rank_search
23           | R1     | 6
24         When marking for delete R1
25         Then table placex contains 
26           | object | rank_search
27           | R1     | 6
28
29     Scenario: Do delete large features of low rank
30         Given the named place areas
31           | osm_type | osm_id | class    | type          | geometry
32           | W        | 1      | place    | house         | (0 0, 2 0, 2 2.1, 0 2, 0 0)
33           | R        | 1      | boundary | national_park | (0 0, 2 0, 2 2.1, 0 2, 0 0)
34         When importing
35         Then table placex contains
36           | object | rank_address
37           | R1     | 0
38           | W1     | 30
39         When marking for delete R1,W1
40         Then table placex has no entry for W1
41         Then table placex has no entry for R1
42
43
44     Scenario: type mutation
45         Given the place nodes
46           | osm_id | class | type | geometry
47           | 3      | shop  | toys | 1 -1
48         When importing
49         Then table placex contains
50           | object | class | type
51           | N3     | shop  | toys
52         When updating place nodes
53           | osm_id | class | type    | geometry
54           | 3      | shop  | grocery | 1 -1
55         Then table placex contains
56           | object | class | type
57           | N3     | shop  | grocery
58
59
60     Scenario: remove postcode place when house number is added
61         Given the place nodes
62           | osm_id | class | type     | postcode | geometry
63           | 3      | place | postcode | 12345    | 1 -1
64         When importing
65         Then table placex contains
66           | object | class | type
67           | N3     | place | postcode
68         When updating place nodes
69           | osm_id | class | type  | postcode | housenumber | geometry
70           | 3      | place | house | 12345    | 13          | 1 -1
71         Then table placex contains
72           | object | class | type
73           | N3     | place | house