ArcGIS Server Banner

ST_LineString

ST_LineString

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback

Definition

ST_LineString constructs a linestring from a well-known text representation.

Syntax

Oracle

sde.st_linestring (wkt clob, srid integer)

PostgreSQL

st_linestring (wkt, srid integer)
st_linestring (esri_shape bytea, srid integer)

Return type

ST_LineString

Example

Oracle

CREATE TABLE lines_test (id smallint, geometry sde.st_geometry);

INSERT INTO lines_test (id, geometry) VALUES (
1901,
sde.st_linestring ('linestring (750 150, 750 750)', 0)
);

SELECT id, sde.st_astext (geometry) Linestring
FROM   lines_test;

  ID  LINESTRING

1901  LINESTRING  (750.00000000 150.00000000, 
750.00000000 750.00000000)

PostgreSQL

CREATE TABLE lines_test (id integer, geometry st_geometry);

INSERT INTO lines_test (id, geometry) VALUES (
1901,
st_linestring ('linestring (750 150, 750 750)', 0)
);

SELECT id, st_astext (geometry) AS Linestring
FROM   lines_test;

  id  linestring

1901  LINESTRING  (750 150, 750 750)

See Also

  • An overview of SQL functions used with ST_Geometry types