Namn

ST_NumCurves — Returnerar antalet komponentkurvor i en CompoundCurve.

Synopsis

integer ST_NumCurves(geometry a_compoundcurve);

Beskrivning

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.

Exempel

This CompoundCurve contains three component curves.

Code
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)
  )');
Rasterutdata
3
Figure
Geometry figure for visual-st-numcurves-01

An empty CompoundCurve has no component curves.

Code
SELECT ST_NumCurves('COMPOUNDCURVE EMPTY');
Rasterutdata
0