Convert housenumber point conversion to function

This commit is contained in:
stirringhalo 2017-01-04 17:40:52 -05:00
parent 2fd3be1403
commit b97e5ad9fb

View File

@ -1,4 +1,9 @@
-- etldoc: osm_housenumber_point -> osm_housenumber_point
UPDATE osm_housenumber_point SET geometry=topoint(geometry)
WHERE ST_GeometryType(geometry) <> 'ST_Point';
CREATE FUNCTION convert_housenumber_point() RETURNS VOID AS $$
BEGIN
UPDATE osm_housenumber_point SET geometry=topoint(geometry) WHERE ST_GeometryType(geometry) <> 'ST_Point';
END;
$$ LANGUAGE plpgsql;
SELECT convert_housenumber_point();