ST_CurveN — Returns the Nth component curve geometry of a CompoundCurve.
geometry ST_CurveN(geometry a_compoundcurve, integer index);
Returns the Nth component curve geometry of a CompoundCurve. The index starts at 1. Returns NULL if the geometry is not a CompoundCurve or the index is out of range.
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.
This example extracts the second component curve, a CircularString, from a CompoundCurve.
SELECT ST_CurveN(
'COMPOUNDCURVE(
(0 0,2 0),
CIRCULARSTRING(2 0,3 1,4 0),
(4 0,6 1)
)',
2) AS curve;
CIRCULARSTRING(2 0,3 1,4 0)
ST_NumCurves, ST_Dump, ST_ExteriorRing, ST_NumInteriorRings, ST_NumGeometries