ST_MLineFromShape takes an ESRI MultiLine shape and a spatial reference ID and returns an ST_MultiLineString.
st_mlinefromshape (esri_shape bytea, srid integer)
Create the sample_mlines table with two geometry columns—one an st_geometry, the other a bytea—and a unique id.
CREATE TABLE sample_mlines (id integer unique, geometry st_geometry, shape bytea);
Add a record to the table.
INSERT INTO sample_mlines (id, geometry) VALUES (
10,
st_multilinestring ('multilinestring ((61 2, 64 3, 65 6), (58 4, 59 5, 61 8), (69 3, 67 4, 66 7, 68 9))', 0)
);
Convert shape to geometry.
UPDATE sample_mlines
SET shape = st_asshape (geometry)
WHERE id = 10;
Use ST_MLineFromShape to return the multilinestring information.
SELECT id, st_astext (st_mlinefromshape (shape)) AS MULTI_LINE_STRING
FROM sample_mlines
WHERE id = 10;
id multi_line_string
10 MULTILINESTRING ((61 2, 64 3, 65 6), (58 4, 59 5,
61 8), (69 3, 67 4, 66 7, 68 9 ))