ST_LineFromText

NotaNota:

Solo es compatible con Oracle y SQLite; para PostgreSQL, utilice ST_LineString.

Definición

ST_LineFromText toma una representación de texto conocida de tipo ST_LineString y un Id. de referencia espacial y devuelve un ST_LineString.

Sintaxis

Oracle

sde.st_linefromtext (wkt clob, srid integer)

SQLite

st_linefromtext (wkt text, srid int32)

Tipo de devolución

ST_LineString

Ejemplo

La tabla linestring_test se crea con una columna única ST_LineString ln1.

La declaración INSERT inserta un ST_LineString en la columna ln1 utilizando la función ST_LineFromText.

Oracle

CREATE TABLE linestring_test (ln1 sde.st_geometry);
INSERT INTO LINESTRING_TEST VALUES (
 sde.st_linefromtext ('linestring (10.01 20.03, 35.93 19.04)', 4326)
);

SQLite

CREATE TABLE linestring_test (id integer);

SELECT AddGeometryColumn (
 NULL,
 'linestring_test',
 'ln1',
 4326,
 'linestring',
 'xy',
 'null'
);
INSERT INTO LINESTRING_TEST (id, ln1) VALUES (
 1,
 st_linefromtext ('linestring (10.01 20.03, 35.93 19.04)', 4326)
);

Temas relacionados

5/10/2014