2 Feature: Rank assignment
3 Tests for assignment of search and address ranks.
5 Scenario: Ranks for place nodes are assinged according to thier type
9 | N11 | place | Continent |
10 | N12 | place | continent |
12 | N14 | place | country |
13 | N15 | place | state |
14 | N16 | place | region |
15 | N17 | place | county |
16 | N18 | place | city |
17 | N19 | place | island |
18 | N36 | place | house |
19 | N38 | place | houses |
21 | osm | class | type | extra+capital |
22 | N101 | place | city | yes |
25 | object | rank_search | rank_address |
40 Scenario: Ranks for boundaries are assigned according to admin level
41 Given the named places
42 | osm | class | type | admin | geometry |
43 | R20 | boundary | administrative | 2 | (1 1, 2 2, 1 2, 1 1) |
44 | R21 | boundary | administrative | 32 | (3 3, 4 4, 3 4, 3 3) |
45 | R22 | boundary | administrative | 6 | (0 0, 1 0, 0 1, 0 0) |
46 | R23 | boundary | administrative | 10 | (0 0, 1 1, 1 0, 0 0) |
49 | object | rank_search | rank_address |
55 Scenario: Ranks for addressable boundaries with place assignment go with place address ranks if available
56 Given the named places
57 | osm | class | type | admin | extra+place | geometry |
58 | R20 | boundary | administrative | 3 | state | (1 1, 2 2, 1 2, 1 1) |
59 | R21 | boundary | administrative | 32 | suburb | (3 3, 4 4, 3 4, 3 3) |
60 | R22 | boundary | administrative | 6 | town | (0 0, 1 0, 0 1, 0 0) |
61 | R23 | boundary | administrative | 10 | village | (0 0, 1 1, 1 0, 0 0) |
64 | object | rank_search | rank_address |
70 Scenario: Place address ranks cannot overtake a parent address rank
71 Given the named places
72 | osm | class | type | admin | extra+place | geometry |
73 | R20 | boundary | administrative | 8 | town | (0 0, 0 2, 2 2, 2 0, 0 0) |
74 | R21 | boundary | administrative | 9 | municipality | (0 0, 0 1, 1 1, 1 0, 0 0) |
75 | R22 | boundary | administrative | 9 | suburb | (0 0, 0 1, 1 1, 1 0, 0 0) |
77 Then place_addressline contains
78 | object | address | cached_rank_address |
82 | object | rank_search | rank_address |
87 Scenario: Admin levels cannot overtake each other due to place address ranks
88 Given the named places
89 | osm | class | type | admin | extra+place | geometry |
90 | R20 | boundary | administrative | 6 | town | (0 0, 0 2, 2 2, 2 0, 0 0) |
91 | R21 | boundary | administrative | 8 | | (0 0, 0 1, 1 1, 1 0, 0 0) |
92 | R22 | boundary | administrative | 8 | suburb | (0 0, 0 1, 1 1, 1 0, 0 0) |
95 | object | rank_search | rank_address |
99 Then place_addressline contains
100 | object | address | cached_rank_address |
104 Scenario: Admin levels must not be larger than 25
105 Given the named places
106 | osm | class | type | admin | extra+place | geometry |
107 | R20 | boundary | administrative | 6 | neighbourhood | (0 0, 0 2, 2 2, 2 0, 0 0) |
108 | R21 | boundary | administrative | 7 | | (0 0, 0 1, 1 1, 1 0, 0 0) |
109 | R22 | boundary | administrative | 8 | | (0 0, 0 0.5, 0.5 0.5, 0.5 0, 0 0) |
112 | object | rank_search | rank_address |