2 Feature: Linking of places
3 Tests for correctly determining linked places
5 Scenario: Only address-describing places can be linked
6 Given the scene way-area-with-center
8 | osm | class | type | name | geometry |
9 | R13 | landuse | forest | Garbo | :area |
10 | N256 | natural | peak | Garbo | :inner-C |
13 | object | linked_place_id |
17 Scenario: Waterways are linked when in waterway relations
18 Given the scene split-road
20 | osm | class | type | name | geometry |
21 | W1 | waterway | river | Rhein | :w-2 |
22 | W2 | waterway | river | Rhein | :w-3 |
23 | R13 | waterway | river | Rhein | :w-1 + :w-2 + :w-3 |
24 | R23 | waterway | river | Limmat| :w-4a |
26 | id | members | tags+type |
27 | 13 | R23:tributary,W1,W2:main_stream | waterway |
30 | object | linked_place_id |
35 When searching for "rhein"
40 Scenario: Relations are not linked when in waterway relations
41 Given the scene split-road
43 | osm | class | type | name | geometry |
44 | W1 | waterway | river | Rhein | :w-2 |
45 | W2 | waterway | river | Rhein | :w-3 |
46 | R1 | waterway | river | Rhein | :w-1 + :w-2 + :w-3 |
47 | R2 | waterway | river | Limmat| :w-4a |
49 | id | members | tags+type |
53 | object | linked_place_id |
59 Scenario: Empty waterway relations are handled correctly
60 Given the scene split-road
62 | osm | class | type | name | geometry |
63 | R1 | waterway | river | Rhein | :w-1 + :w-2 + :w-3 |
65 | id | members | tags+type |
69 | object | linked_place_id |
72 Scenario: Waterways are not linked when waterway types don't match
73 Given the scene split-road
75 | osm | class | type | name | geometry |
76 | W1 | waterway | drain | Rhein | :w-2 |
77 | R1 | waterway | river | Rhein | :w-1 + :w-2 + :w-3 |
79 | id | members | tags+type |
80 | 1 | N23,N34,W1,R45 | multipolygon |
83 | object | linked_place_id |
86 When searching for "rhein"
92 Scenario: Side streams are linked only when they have the same name
93 Given the scene split-road
95 | osm | class | type | name | geometry |
96 | W1 | waterway | river | Rhein2 | :w-2 |
97 | W2 | waterway | river | Rhein | :w-3 |
98 | R1 | waterway | river | Rhein | :w-1 + :w-2 + :w-3 |
100 | id | members | tags+type |
101 | 1 | W1:side_stream,W2:side_stream | waterway |
104 | object | linked_place_id |
107 When searching for "rhein2"
113 Scenario: Boundaries should only be linked to places
114 Given the named places
115 | osm | class | type | extra+wikidata | admin | geometry |
116 | R1 | boundary | administrative | 34 | 8 | poly-area:0.1 |
118 | osm | class | type | geometry |
119 | N3 | natural | island | 0.00001 0 |
120 | N3 | place | city | 0.00001 0 |
126 | object | linked_place_id |