ST_NumCurves — 返回复合曲线中的曲线数量。
integer ST_NumCurves(geometry a_compoundcurve);
返回复合曲线中的曲线数量。如果输入为空的复合曲线,则返回0;如果不是复合曲线,则返回NULL。
该方法实现了SQL/MM规范。 SQL-MM 3: 8.2.6, 8.3.5
该函数支持 3d 并且不会丢失 z-index。
This CompoundCurve contains three component curves.
SELECT ST_NumCurves('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)
)');
3
An empty CompoundCurve has no component curves.
SELECT ST_NumCurves('COMPOUNDCURVE EMPTY');
0