STCurveToLine (geometry)

STCurveToLine (geometry)#

Returns a polygonal approximation of a geometry instance that contains circular arc segments.

Syntax#

.STCurveToLine ()

Return type#

geometry

Remarks#

Returns an empty GeometryCollectioninstance for empty geometry instance variables, and returns NULL for uninitialized geometry variables.

The polygonal approximation that the method returns depends on the geometry instance that you use to call the method:

  • Returns a LineString instance for a CircularString or CompoundCurve instance.

  • Returns a Polygon instance for a CurvePolygon instance.

  • Returns a copy of the geometry instance if that instance is not a CircularString, CompoundCurve, or CurvePolygon instance. For example, the STCurveToLine method returns a Point instance for a geometry instance that is a Point instance.

Unlike the SQL/MM specification, the STCurveToLine method does not use z-coordinate values to calculate the polygonal approximation. The method ignores any z-coordinate values present in the calling geometry instance.

Example#

Use a LineString Instance.

DECLARE @g geometry;
SET @g = geometry::Parse('LINESTRING(1 3, 5 5, 4 3, 1 3)');
SET @g = @g.STCurveToLine();
SELECT @g.STGeometryType();

See Also#