ST_PointFromShape |
|
Release 9.3 |
NOTE: Spatial type for PostgreSQL only
st_pointfromshape (esri_shape bytea, srid integer)
CREATE TABLE pts (id integer, geometry st_point, shape bytea);
INSERT INTO pts (id, geometry) VALUES (
10,
st_point ('point (44 14)', 0)
);
INSERT INTO pts (id, geometry) VALUES (
11,
st_point ('point (24 13)', 0)
);
UPDATE pts
SET shape = st_asshape (geometry)
WHERE id = 10;
UPDATE pts
SET shape = st_asshape (geometry)
WHERE id = 11;
SELECT id, st_astext (st_pointfromshape(shape, 0)) AS points
FROM pts;
id points
10 POINT (44 14)
11 POINT (24 13)