From: Brian Quinion Date: Mon, 26 Mar 2012 22:57:24 +0000 (+0100) Subject: Merge branch 'master' of github.com:twain47/Nominatim X-Git-Tag: v2.0.0~97 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/80cf5df1cd5c249a547f877c73fd6feba9b763b0 Merge branch 'master' of github.com:twain47/Nominatim --- 80cf5df1cd5c249a547f877c73fd6feba9b763b0 diff --cc sql/functions.sql index 9a613152,a44fee9e..7e9f957b --- a/sql/functions.sql +++ b/sql/functions.sql @@@ -1115,12 -1115,11 +1115,12 @@@ BEGI IF st_area(NEW.geometry) < 1 THEN -- mark items within the geometry for re-indexing -- RAISE WARNING 'placex poly insert: % % % %',NEW.osm_type,NEW.osm_id,NEW.class,NEW.type; --- work around bug in postgis + + -- work around bug in postgis, this may have been fixed in 2.0.0 (see http://trac.osgeo.org/postgis/ticket/547) update placex set indexed_status = 2 where (ST_Contains(NEW.geometry, placex.geometry) OR ST_Intersects(NEW.geometry, placex.geometry)) - AND rank_search > NEW.rank_search and indexed_status = 0 and ST_geometrytype(placex.geometry) = 'ST_Point'; + AND rank_search > NEW.rank_search and indexed_status = 0 and ST_geometrytype(placex.geometry) = 'ST_Point' and (rank_search < 28 or name is not null); update placex set indexed_status = 2 where (ST_Contains(NEW.geometry, placex.geometry) OR ST_Intersects(NEW.geometry, placex.geometry)) - AND rank_search > NEW.rank_search and indexed_status = 0 and ST_geometrytype(placex.geometry) != 'ST_Point'; + AND rank_search > NEW.rank_search and indexed_status = 0 and ST_geometrytype(placex.geometry) != 'ST_Point' and (rank_search < 28 or name is not null); END IF; ELSE -- mark nearby items for re-indexing, where 'nearby' depends on the features rank_search and is a complete guess :(