STCurveN (geometry)#
Returns the curve specified from a geometry instance that is a LineString, CircularString, CompoundCurve, or MultiLineString.
Syntax#
.STCurveN ( curve_index )
Arguments#
curve_index
Is an int expression between 1 and the number of curves in the geometry instance.
Return type#
geometry
Exceptions#
If curve_index < 1 then an ArgumentOutOfRangeException is thrown.
Remarks#
NULL is returned when any of the following occurs:
the geometry instance is declared, but not instantiated
the geometry instance is empty
curve_index exceeds the number of curves in the geometry instance
the geometry instance is a Point, MultiPoint, Polygon, CurvePolygon, or MultiPolygon
Example#
Use STCurveN() on a CircularString instance.
DECLARE @g geometry = 'CIRCULARSTRING(0 0, 1 2.1082, 3 6.3246, 0 7, -3 6.3246, -1 2.1082, 0 0)';
SELECT @g.STCurveN(2).ToString();