--DEBUG: RAISE WARNING '% %',NEW.osm_type,NEW.osm_id;
-- just block these
- IF NEW.class = 'highway' and NEW.type in ('turning_circle','traffic_signals','mini_roundabout','noexit','crossing') THEN
--- RAISE WARNING 'bad highway %',NEW.osm_id;
- RETURN null;
- END IF;
IF NEW.class in ('landuse','natural') and NEW.name is null THEN
-- RAISE WARNING 'empty landuse %',NEW.osm_id;
RETURN null;
END IF;
-- Just block these - lots and pointless
- IF NEW.class = 'highway' and NEW.type in ('turning_circle','traffic_signals','mini_roundabout','noexit','crossing') THEN
- RETURN null;
- END IF;
IF NEW.class in ('landuse','natural') and NEW.name is null THEN
RETURN null;
END IF;
country_code = NEW.country_code,
parent_place_id = null,
extratags = NEW.extratags,
- admin_level = NEW.admin_level,
+ admin_level = CASE WHEN NEW.admin_level > 15 THEN 15 ELSE NEW.admin_level END,
indexed_status = 2,
geometry = NEW.geometry
where place_id = existingplacex.place_id;