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.
This commit is contained in:
Sarah Hoffmann
2025-07-21 16:11:06 +02:00
parent e1cef3de0a
commit 4cbbe04f7f

View File

@@ -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