ST_PolyFromText

HinweisHinweis:

Nur Oracle und SQLite

Definition

Mit ST_PolyFromText wird anhand eines Well-Known Text-Formats und einer Raumbezugs-ID ein ST_Polygon-Objekt zurückgegeben.

Syntax

Oracle

sde.st_polyfromtext (wkt clob, srid integer)

SQLite

st_polyfromtext (wkt text, srid int32)

Rückgabetyp

ST_Polygon

Beispiel

Die Tabelle "polygon_test" wird mit der Spalte "polygon" erstellt.

Mit der INSERT-Anweisung wird mithilfe der Funktion ST_PolyFromText ein Polygon in die Spalte "polygon" eingefügt.

Oracle

CREATE TABLE polygon_test (pl1 sde.st_geometry);
INSERT INTO polygon_test VALUES (
 sde.st_polyfromtext ('polygon ((10.01 20.03, 10.52 40.11, 30.29 41.56, 31.78 10.74, 10.01 20.03))', 4326)
);

SQLite

CREATE TABLE polygon_test (id integer);

SELECT AddGeometryColumn(
 NULL,
 'polygon_test',
 'pl1',
 4326,
 'polygon',
 'xy',
 'null'
);
INSERT INTO polygon_test VALUES (
 1,
 st_polyfromtext ('polygon ((10.01 20.03, 10.52 40.11, 30.29 41.56, 31.78 10.74, 10.01 20.03))', 4326)
);

Verwandte Themen

5/10/2014