]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 23 Apr 2017 20:48:29 +0000 (22:48 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 23 Apr 2017 20:48:29 +0000 (22:48 +0200)
1  2 
sql/functions.sql

diff --combined sql/functions.sql
index e6e51a25aac2eea7525c19d75f9e8d274ec623b2,3966e8222fdaed00b12f4af241d639969becf0f7..691ba85e39716700e568565d620a98d3e324904f
@@@ -2043,7 -2043,7 +2043,7 @@@ BEGI
        AND st_area(NEW.geometry) < st_area(existing.geometry)*0.5
        THEN
        INSERT INTO import_polygon_error (osm_type, osm_id, class, type, name, country_code, updated, errormessage, prevgeometry, newgeometry)
-         VALUES (NEW.osm_type, NEW.osm_id, NEW.class, NEW.type, NEW.name, NEW.country_code, now(), 
+         VALUES (NEW.osm_type, NEW.osm_id, NEW.class, NEW.type, NEW.name, NEW.address->'country', now(), 
          'Area reduced from '||st_area(existing.geometry)||' to '||st_area(NEW.geometry), existing.geometry, NEW.geometry);
        RETURN null;
      END IF;
@@@ -2374,7 -2374,7 +2374,7 @@@ BEGI
        CASE WHEN class = 'place' and type = 'postcode' THEN hstore('name', postcode) ELSE name END as name,
        CASE WHEN extratags ? 'place' THEN 'place' ELSE class END as class,
        CASE WHEN extratags ? 'place' THEN extratags->'place' ELSE type END as type,
 -      admin_level, fromarea, isaddress,
 +      admin_level, fromarea, isaddress and linked_place_id is NULL as isaddress,
        CASE WHEN address_place_id = for_place_id AND rank_address = 0 THEN 100 WHEN rank_address = 11 THEN 5 ELSE rank_address END as rank_address,
        distance,country_code,postcode
        from place_addressline join placex on (address_place_id = placex.place_id)