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));