X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b9e4563bebaf2b2bfba5440001b4b5750eaebe43..ad50016c498098d0f0850c3a9de60623a3bd7e1f:/lib-sql/functions/placex_triggers.sql diff --git a/lib-sql/functions/placex_triggers.sql b/lib-sql/functions/placex_triggers.sql index 01f99715..9d0d73b5 100644 --- a/lib-sql/functions/placex_triggers.sql +++ b/lib-sql/functions/placex_triggers.sql @@ -668,7 +668,7 @@ BEGIN NEW.place_id := nextval('seq_place'); NEW.indexed_status := 1; --STATUS_NEW - NEW.centroid := ST_PointOnSurface(NEW.geometry); + NEW.centroid := get_center_point(NEW.geometry); NEW.country_code := lower(get_country_code(NEW.centroid)); NEW.partition := get_partition(NEW.country_code); @@ -870,7 +870,7 @@ BEGIN END IF; -- Compute a preliminary centroid. - NEW.centroid := ST_PointOnSurface(NEW.geometry); + NEW.centroid := get_center_point(NEW.geometry); -- recalculate country and partition IF NEW.rank_search = 4 AND NEW.address is not NULL AND NEW.address ? 'country' THEN