poi topoint function

This commit is contained in:
stirringhalo 2017-01-04 17:42:05 -05:00
parent b97e5ad9fb
commit f1ee63e4bb

View File

@ -1,5 +1,11 @@
-- etldoc: osm_poi_polygon -> osm_poi_polygon
UPDATE osm_poi_polygon SET geometry=topoint(geometry)
WHERE ST_GeometryType(geometry) <> 'ST_Point';
ANALYZE osm_poi_polygon;
CREATE FUNCTION convert_poi_point() RETURNS VOID AS $$
BEGIN
UPDATE osm_poi_polygon SET geometry=topoint(geometry) WHERE ST_GeometryType(geometry) <> 'ST_Point';
ANALYZE osm_poi_polygon;
END;
$$ LANGUAGE plpgsql;
SELECT convert_poi_point();