]> git.openstreetmap.org Git - nominatim.git/commitdiff
raise warning when invalid geomery is inserted
authorSarah Hoffmann <lonvia@denofr.de>
Sat, 4 Jan 2020 20:29:55 +0000 (21:29 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sat, 4 Jan 2020 20:29:55 +0000 (21:29 +0100)
Enabled to check the logs if this case still happens.
It shouldn't.

sql/functions.sql

index 5d2b7a2216aa8a95c9e4bfbca324ca3828db0b43..43ab4fffb04251e7690e117bc00862179ec97170 100644 (file)
@@ -2020,7 +2020,7 @@ BEGIN
   IF ST_IsEmpty(NEW.geometry) OR NOT ST_IsValid(NEW.geometry) OR ST_X(ST_Centroid(NEW.geometry))::text in ('NaN','Infinity','-Infinity') OR ST_Y(ST_Centroid(NEW.geometry))::text in ('NaN','Infinity','-Infinity') THEN  
     INSERT INTO import_polygon_error (osm_type, osm_id, class, type, name, country_code, updated, errormessage, prevgeometry, newgeometry)
       VALUES (NEW.osm_type, NEW.osm_id, NEW.class, NEW.type, NEW.name, NEW.address->'country', now(), ST_IsValidReason(NEW.geometry), null, NEW.geometry);
---    RAISE WARNING 'Invalid Geometry: % % % %',NEW.osm_type,NEW.osm_id,NEW.class,NEW.type;
+    RAISE WARNING 'Invalid Geometry: % % % %',NEW.osm_type,NEW.osm_id,NEW.class,NEW.type;
     RETURN null;
   END IF;