X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/4c72cdaa865d9df7064bc03ff282384b037865a7..84bac1bb4df234d0c25d94fb1abbf9289d2d55c1:/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