From: Sarah Hoffmann Date: Tue, 16 Jul 2019 20:31:58 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: deploy~279 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/edebf5f1b21e448a2a43de9e91aa9629565ca321?hp=-c Merge remote-tracking branch 'upstream/master' --- edebf5f1b21e448a2a43de9e91aa9629565ca321 diff --combined sql/functions.sql index c97d11da,bad4b17c..2c7dbe75 --- a/sql/functions.sql +++ b/sql/functions.sql @@@ -547,7 -547,7 +547,7 @@@ BEGI -- RAISE WARNING 'get_country_code, start: %', ST_AsText(place_centre); -- Try for a OSM polygon - FOR nearcountry IN select country_code from location_area_country where country_code is not null and not isguess and st_covers(geometry, place_centre) limit 1 + FOR nearcountry IN select country_code from location_area_country where country_code is not null and st_covers(geometry, place_centre) limit 1 LOOP RETURN nearcountry.country_code; END LOOP; @@@ -1824,7 -1824,7 +1824,7 @@@ BEGI -- RAISE WARNING '% isaddress: %', location.place_id, location_isaddress; -- Add it to the list of search terms - IF NOT %REVERSE-ONLY% AND location.rank_search > 4 THEN + IF NOT %REVERSE-ONLY% THEN nameaddress_vector := array_merge(nameaddress_vector, location.keywords::integer[]); END IF; INSERT INTO place_addressline (place_id, address_place_id, fromarea, isaddress, distance, cached_rank_address) @@@ -2449,7 -2449,7 +2449,7 @@@ BEGI SELECT placex.place_id, osm_type, osm_id, 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 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)