]> git.openstreetmap.org Git - nominatim.git/commitdiff
ignore postcode boundaries without postcode
authorSarah Hoffmann <lonvia@denofr.de>
Sat, 14 Apr 2012 07:27:10 +0000 (09:27 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sat, 14 Apr 2012 07:27:10 +0000 (09:27 +0200)
sql/functions.sql

index c21ae1f9010d106fadf467cace96e76ec76dbd7d..5c4e9f2d627fc473d4736634d54ecd0ea900bcd8 100644 (file)
@@ -942,6 +942,11 @@ BEGIN
     -- By doing in postgres we have the country available to us - currently only used for postcode
     IF NEW.class in ('place','boundary') AND NEW.type in ('postcode','postal_code') THEN
 
+        IF NEW.postcode IS NULL THEN
+            -- most likely just a part of a multipolygon postcode boundary, throw it away
+            RETURN NULL;
+        END IF;
+
         NEW.name := 'ref'=>NEW.postcode;
 
         IF NEW.country_code = 'gb' THEN