ST_CurveN — 返回 CompoundCurve 的第 N 个组成曲线几何图形。
geometry ST_CurveN(geometry a_compoundcurve, integer index);
返回 CompoundCurve 的第 N 个组成曲线几何图形。索引从 1 开始。如果几何图形不是 CompoundCurve 或索引超出范围,则返回 NULL。
此方法实现了 SQL/MM 规范。SQL-MM 3: 8.2.6, 8.3.5
此函数支持 3D,并且不会删除 z 索引。
SELECT ST_AsText(ST_CurveN('COMPOUNDCURVE(
(2 2, 2.5 2.5),
CIRCULARSTRING(2.5 2.5, 4.5 2.5, 3.5 3.5),
(3.5 3.5, 2.5 4.5, 3 5, 2 2)
)', 1));