X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/06204dfcd861bc46547bfbb670dd7ce2e6ef3876..a846872f04106b18c1d0cf2b77c3236a88e959d7:/lib-sql/functions/place_triggers.sql

diff --git a/lib-sql/functions/place_triggers.sql b/lib-sql/functions/place_triggers.sql
index f3b6ab2b..5b4a8441 100644
--- a/lib-sql/functions/place_triggers.sql
+++ b/lib-sql/functions/place_triggers.sql
@@ -296,7 +296,9 @@ BEGIN
           extratags = NEW.extratags,
           admin_level = NEW.admin_level,
           indexed_status = 2,
-          geometry = NEW.geometry
+          geometry = CASE WHEN existingplacex.rank_address = 0
+                          THEN simplify_large_polygons(NEW.geometry)
+                          ELSE NEW.geometry END
       WHERE place_id = existingplacex.place_id;
 
     -- Invalidate linked places: they potentially get a new name and addresses.
