avoid unnamed streets in associated street relations

fixes https://trac.openstreetmap.org/ticket/4877
This commit is contained in:
Sarah Hoffmann
2014-04-28 20:27:09 +02:00
parent 5882a15bac
commit 6a1e599f31

View File

@@ -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;