ST_NumCurves — Returnerar antalet komponentkurvor i en CompoundCurve.
integer ST_NumCurves(geometry a_compoundcurve);
Returnerar antalet komponentkurvor i en CompoundCurve, noll för en tom CompoundCurve, eller NULL för en icke-CompoundCurve-indata.
Denna metod implementerar SQL/MM-specifikationen. SQL-MM 3: 8.2.6, 8.3.5
Denna funktion stöder 3d och kommer inte att tappa 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