ST_LineFromShape |
|
Release 9.3 |
NOTE: Spatial type for PostgreSQL only
st_linefromshape (esri_shape bytea, srid integer)
CREATE TABLE lshape (id integer unique, geom1 st_linestring, geom2 bytea);
INSERT INTO lshape (id, geom1) VALUES (
100,
st_linestring ('linestring (850 250, 850 850)', 0)
);
INSERT INTO lshape (id, geom1) VALUES (
101,
st_linestring ('linestring (33 2, 34 3, 35 6)', 0)
);
UPDATE lshape
SET geom2 = st_asshape (geom1)
WHERE id = 100;
UPDATE lshape
SET geom2 = st_asshape (geom1)
WHERE id = 101;
SELECT id, st_astext (st_linefromshape (geom2)) AS LINE
FROM lshape;
id line
100 LINESTRING ( 850 250, 850 850)
101 LINESTRING ( 33 2, 34 3, 35 6)