From 6a1e599f31049b940d906fce9505a79672ef527a Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 28 Apr 2014 20:27:09 +0200 Subject: [PATCH] avoid unnamed streets in associated street relations fixes https://trac.openstreetmap.org/ticket/4877 --- sql/functions.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/functions.sql b/sql/functions.sql index 4b0483c3..6a465e0b 100644 --- a/sql/functions.sql +++ b/sql/functions.sql @@ -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; -- 2.39.5