]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/db/update/simple.feature
0ae0ac4a25a0a2376a092ad0b0cb09204b62de63
[nominatim.git] / test / bdd / db / update / simple.feature
1 @DB
2 Feature: Update of simple objects
3     Testing simple updating functionality
4
5     Scenario: Do delete small boundary features
6         Given the places
7           | osm | class    | type           | admin | geometry |
8           | R1  | boundary | administrative | 3     | poly-area:1.0 |
9         When importing
10         Then placex contains
11           | object | rank_search |
12           | R1     | 6 |
13         When marking for delete R1
14         Then placex has no entry for R1
15
16     Scenario: Do not delete large boundary features
17         Given the places
18           | osm | class    | type           | admin | geometry |
19           | R1  | boundary | administrative | 3     | poly-area:5.0 |
20         When importing
21         Then placex contains
22           | object | rank_search |
23           | R1     | 6 |
24         When marking for delete R1
25         Then placex contains 
26           | object | rank_search |
27           | R1     | 6 |
28
29     Scenario: Do delete large features of low rank
30         Given the named places
31           | osm | class    | type        | geometry |
32           | W1  | place    | house       | poly-area:5.0 |
33           | R1  | natural  | wood        | poly-area:5.0 |
34           | R2  | highway  | residential | poly-area:5.0 |
35         When importing
36         Then placex contains
37           | object | rank_address |
38           | R1     | 30 |
39           | R2     | 26 |
40           | W1     | 30 |
41         When marking for delete R1,R2,W1
42         Then placex has no entry for W1
43         Then placex has no entry for R1
44         Then placex has no entry for R2
45
46     Scenario: type mutation
47         Given the places
48           | osm | class | type | geometry |
49           | N3  | shop  | toys | 1 -1 |
50         When importing
51         Then placex contains
52           | object | class | type | centroid |
53           | N3     | shop  | toys | 1 -1 |
54         When updating places
55           | osm | class | type    | geometry |
56           | N3  | shop  | grocery | 1 -1 |
57         Then placex contains
58           | object | class | type    | centroid |
59           | N3     | shop  | grocery | 1 -1 |
60
61     Scenario: remove postcode place when house number is added
62         Given the places
63           | osm | class | type     | postcode | geometry |
64           | N3  | place | postcode | 12345    | 1 -1 |
65         When importing
66         Then placex contains
67           | object | class | type |
68           | N3     | place | postcode |
69         When updating places
70           | osm | class | type  | postcode | housenr | geometry |
71           | N3  | place | house | 12345    | 13      | 1 -1 |
72         Then placex contains
73           | object | class | type |
74           | N3     | place | house |
75
76     Scenario: remove boundary when changing from polygon to way
77         Given the grid
78           | 1 | 2 |
79           | 3 | 4 |
80         And the places
81           | osm | class    | type           | name | admin | geometry        |
82           | W1  | boundary | administrative | Haha | 5     | (1, 2, 4, 3, 1) |
83         When importing
84         Then placex contains
85           | object |
86           | W1 |
87         When updating places
88           | osm | class    | type           | name | admin | geometry   |
89           | W1  | boundary | administrative | Haha | 5     | 1, 2, 4, 3 |
90         Then placex has no entry for W1
91
92      #895
93      Scenario: update rank when boundary is downgraded from admin to historic
94         Given the grid
95           | 1 | 2 |
96           | 3 | 4 |
97         And the places
98           | osm | class    | type           | name | admin | geometry        |
99           | W1  | boundary | administrative | Haha | 5     | (1, 2, 4, 3, 1) |
100         When importing
101         Then placex contains
102           | object | rank_address |
103           | W1     | 10           |
104         When updating places
105           | osm | class    | type           | name | admin | geometry        |
106           | W1  | boundary | historic       | Haha | 5     | (1, 2, 4, 3, 1) |
107         Then placex contains
108           | object | rank_address |
109           | W1     | 0            |