]> git.openstreetmap.org Git - nominatim.git/commitdiff
avoid unnamed streets in associated street relations
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 28 Apr 2014 18:27:09 +0000 (20:27 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 28 Apr 2014 18:27:09 +0000 (20:27 +0200)
fixes https://trac.openstreetmap.org/ticket/4877

sql/functions.sql

index 4b0483c344cb4bad9b14d5aa41829ee30cb97269..6a465e0b8735e0bd325c0c049384d7734daeb3f1 100644 (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;