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