mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-11 05:14:07 +00:00
avoid unnamed streets in associated street relations
fixes https://trac.openstreetmap.org/ticket/4877
This commit is contained in:
@@ -1431,7 +1431,7 @@ BEGIN
|
|||||||
IF NEW.parent_place_id IS NULL AND relation.members[i+1] = 'street' THEN
|
IF NEW.parent_place_id IS NULL AND relation.members[i+1] = 'street' THEN
|
||||||
--RAISE WARNING 'node in relation %',relation;
|
--RAISE WARNING 'node in relation %',relation;
|
||||||
SELECT place_id from placex where osm_type='W' and osm_id = substring(relation.members[i],2,200)::bigint
|
SELECT place_id from placex where osm_type='W' and osm_id = substring(relation.members[i],2,200)::bigint
|
||||||
and rank_search = 26 INTO NEW.parent_place_id;
|
and rank_search = 26 and name is not null INTO NEW.parent_place_id;
|
||||||
END IF;
|
END IF;
|
||||||
END LOOP;
|
END LOOP;
|
||||||
END IF;
|
END IF;
|
||||||
@@ -1460,7 +1460,7 @@ BEGIN
|
|||||||
IF NEW.parent_place_id IS NULL AND relation.members[i+1] = 'street' THEN
|
IF NEW.parent_place_id IS NULL AND relation.members[i+1] = 'street' THEN
|
||||||
--RAISE WARNING 'node in way that is in a relation %',relation;
|
--RAISE WARNING 'node in way that is in a relation %',relation;
|
||||||
SELECT place_id from placex where osm_type='W' and osm_id = substring(relation.members[i],2,200)::bigint
|
SELECT place_id from placex where osm_type='W' and osm_id = substring(relation.members[i],2,200)::bigint
|
||||||
and rank_search = 26 INTO NEW.parent_place_id;
|
and rank_search = 26 and name is not null INTO NEW.parent_place_id;
|
||||||
END IF;
|
END IF;
|
||||||
END LOOP;
|
END LOOP;
|
||||||
END IF;
|
END IF;
|
||||||
@@ -1510,7 +1510,7 @@ BEGIN
|
|||||||
IF NEW.parent_place_id IS NULL AND relation.members[i+1] = 'street' THEN
|
IF NEW.parent_place_id IS NULL AND relation.members[i+1] = 'street' THEN
|
||||||
--RAISE WARNING 'way that is in a relation %',relation;
|
--RAISE WARNING 'way that is in a relation %',relation;
|
||||||
SELECT place_id from placex where osm_type='W' and osm_id = substring(relation.members[i],2,200)::bigint
|
SELECT place_id from placex where osm_type='W' and osm_id = substring(relation.members[i],2,200)::bigint
|
||||||
and rank_search = 26 INTO NEW.parent_place_id;
|
and rank_search = 26 and name is not null INTO NEW.parent_place_id;
|
||||||
END IF;
|
END IF;
|
||||||
END LOOP;
|
END LOOP;
|
||||||
END IF;
|
END IF;
|
||||||
|
|||||||
Reference in New Issue
Block a user