forked from hans/Nominatim
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
|
||||
--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
|
||||
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 LOOP;
|
||||
END IF;
|
||||
@@ -1460,7 +1460,7 @@ BEGIN
|
||||
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;
|
||||
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 LOOP;
|
||||
END IF;
|
||||
@@ -1510,7 +1510,7 @@ BEGIN
|
||||
IF NEW.parent_place_id IS NULL AND relation.members[i+1] = 'street' THEN
|
||||
--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
|
||||
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 LOOP;
|
||||
END IF;
|
||||
|
||||
Reference in New Issue
Block a user