mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-10-05 06:57:34 +03:00
when linking waterway ways and relations allow all river-like types
Fixes #848
This commit is contained in:
parent
ed85388de5
commit
35c7269bac
@ -1355,7 +1355,7 @@ BEGIN
|
||||
--DEBUG: RAISE WARNING 'waterway parent %, child %/%', NEW.osm_id, i, relation_members[i];
|
||||
FOR linked_node_id IN SELECT place_id FROM placex
|
||||
WHERE osm_type = 'W' and osm_id = substring(relation_members[i],2,200)::bigint
|
||||
and class = NEW.class and type = NEW.type
|
||||
and class = NEW.class and type in ('river', 'stream', 'canal', 'drain', 'ditch')
|
||||
and ( relation_members[i+1] != 'side_stream' or NEW.name->'name' = name->'name')
|
||||
LOOP
|
||||
UPDATE placex SET linked_place_id = NEW.place_id WHERE place_id = linked_node_id;
|
||||
|
@ -40,11 +40,11 @@ Feature: Linking of places
|
||||
Scenario: Relations are not linked when in waterway relations
|
||||
Given the scene split-road
|
||||
And the places
|
||||
| osm | class | type | name | geometry |
|
||||
| W1 | waterway | river | Rhein | :w-2 |
|
||||
| W2 | waterway | river | Rhein | :w-3 |
|
||||
| R1 | waterway | river | Rhein | :w-1 + :w-2 + :w-3 |
|
||||
| R2 | waterway | river | Limmat| :w-4a |
|
||||
| osm | class | type | name | geometry |
|
||||
| W1 | waterway | stream | Rhein | :w-2 |
|
||||
| W2 | waterway | river | Rhein | :w-3 |
|
||||
| R1 | waterway | river | Rhein | :w-1 + :w-2 + :w-3 |
|
||||
| R2 | waterway | river | Limmat| :w-4a |
|
||||
And the relations
|
||||
| id | members | tags+type |
|
||||
| 1 | R2 | waterway |
|
||||
@ -69,11 +69,11 @@ Feature: Linking of places
|
||||
| object | linked_place_id |
|
||||
| R1 | - |
|
||||
|
||||
Scenario: Waterways are not linked when waterway types don't match
|
||||
Scenario: Waterways are not linked when the way type is not a river feature
|
||||
Given the scene split-road
|
||||
And the places
|
||||
| osm | class | type | name | geometry |
|
||||
| W1 | waterway | drain | Rhein | :w-2 |
|
||||
| W1 | waterway | lock | Rhein | :w-2 |
|
||||
| R1 | waterway | river | Rhein | :w-1 + :w-2 + :w-3 |
|
||||
And the relations
|
||||
| id | members | tags+type |
|
||||
|
Loading…
Reference in New Issue
Block a user