Nome

ST_NumCurves — Return the number of component curves in a CompoundCurve.

Sinossi

integer ST_NumCurves(geometry a_compoundcurve);

Descrizione

Return the number of component curves in a CompoundCurve, zero for an empty CompoundCurve, or NULL for a non-CompoundCurve input.

Questo metodo implementa la specifica SQL/MM. SQL-MM 3: 8.2.6, 8.3.5

Questa funzione supporta il 3d e non distrugge gli z-index.

Esempi

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

An empty CompoundCurve has no component curves.

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