mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 02:47:59 +00:00
make sure invalid geometries are always deleted from place
This solves a bug with updating large invalid geometries. These geometries have an entry in place but not in placex. Thus, place_insert tries to delete the place entry and reinsert it on update. Deletion would fail because self-intersecting polygons still have an area and large areas are not deleted.
This commit is contained in:
@@ -1806,8 +1806,8 @@ BEGIN
|
||||
|
||||
--DEBUG: RAISE WARNING 'delete: % % % %',OLD.osm_type,OLD.osm_id,OLD.class,OLD.type;
|
||||
|
||||
-- deleting large polygons can have a massive effect ont he system - require manual intervention to let them through
|
||||
IF st_area(OLD.geometry) > 2 THEN
|
||||
-- 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
|
||||
insert into import_polygon_delete values (OLD.osm_type,OLD.osm_id,OLD.class,OLD.type);
|
||||
RETURN NULL;
|
||||
END IF;
|
||||
|
||||
Reference in New Issue
Block a user