定义
ST_Curve 基于可识别的文本表示来构造曲线要素。
语法
Oracle
sde.st_curve (wkt clob, srid integer)
SQLite
st_curve (wkt text, srid int32)
返回类型
ST_LineString
示例
本示例使用曲线几何创建表,向其中插入值,然后选择一个要素。
Oracle
CREATE TABLE curve_test (
id integer,
geometry sde.st_curve
);
INSERT INTO CURVE_TEST VALUES (
1910,
sde.st_curve ('linestring (33 2, 34 3, 35 6)', 4326)
);
SELECT id, sde.st_astext (geometry) CURVE
FROM CURVE_TEST;
ID CURVE
1110 LINESTRING (33.00000000 2.00000000, 34.00000000 3.00000000,
35.00000000 6.00000000)
SQLite
CREATE TABLE curve_test (
id integer primary key autoincrement not null
);
SELECT AddGeometryColumn(
NULL,
'curve_test',
'geometry',
4326,
'linestring',
'xy',
'null'
);
INSERT INTO CURVE_TEST (geometry) VALUES (
st_curve ('linestring (33 2, 34 3, 35 6)', 4326)
);
SELECT id, st_astext (geometry)
AS curve
FROM curve_test;
id curve
1 LINESTRING (33.00000000 2.00000000, 34.00000000 3.00000000,
35.00000000 6.00000000)