do not block deletion of large highway areas

Deletion of areas should only e blocked for addressable features.
Streets and POIs do not have a large impact on updates.
This commit is contained in:
Sarah Hoffmann
2020-08-28 09:49:21 +02:00
parent 770754ae2c
commit 6e4b7eb966
2 changed files with 5 additions and 2 deletions

View File

@@ -262,7 +262,7 @@ BEGIN
-- deleting large polygons can have a massive effect on the system - require manual intervention to let them through
IF st_area(OLD.geometry) > 2 and st_isvalid(OLD.geometry) THEN
SELECT bool_or(not (rank_address = 0 or rank_address > 26)) as ranked FROM placex WHERE osm_type = OLD.osm_type and osm_id = OLD.osm_id and class = OLD.class and type = OLD.type INTO has_rank;
SELECT bool_or(not (rank_address = 0 or rank_address > 25)) as ranked FROM placex WHERE osm_type = OLD.osm_type and osm_id = OLD.osm_id and class = OLD.class and type = OLD.type INTO has_rank;
IF has_rank THEN
insert into import_polygon_delete (osm_type, osm_id, class, type) values (OLD.osm_type,OLD.osm_id,OLD.class,OLD.type);
RETURN NULL;