From 4cbbe04f7fd2f14e88b67c5df0a41dda83e60e2d Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 21 Jul 2025 16:11:06 +0200 Subject: [PATCH] align limits for deferring delete and reindexing on insert Right now when a boundary with an area between 1 and 2 broke, it was deleted but on reinsert afer repair, the addresses are not updated resulting in inconsistent data. --- lib-sql/functions/placex_triggers.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib-sql/functions/placex_triggers.sql b/lib-sql/functions/placex_triggers.sql index 746ed3c2..170b8a3f 100644 --- a/lib-sql/functions/placex_triggers.sql +++ b/lib-sql/functions/placex_triggers.sql @@ -732,7 +732,7 @@ BEGIN IF NEW.rank_address between 2 and 27 THEN IF (ST_GeometryType(NEW.geometry) in ('ST_Polygon','ST_MultiPolygon') AND ST_IsValid(NEW.geometry)) THEN -- Performance: We just can't handle re-indexing for country level changes - IF (NEW.rank_address < 26 and st_area(NEW.geometry) < 1) + IF (NEW.rank_address < 26 and st_area(NEW.geometry) <= 2) OR (NEW.rank_address >= 26 and st_area(NEW.geometry) < 0.01) THEN -- mark items within the geometry for re-indexing -- 2.39.5