STCurveToLine (geography Data Type)

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

Syntax

.STCurveToLine()

Return Types

SQL Server return type: geography

CLR return type: SqlGeography

Remarks

Returns a LineString instance for a CircularString or CompoundCurve instance.

Returns a Polygon instance for a CurvePolygon instance.

Return a copy of geography instances that do not contain CircularString, CompoundCurve, or CurvePolygon instances.

Unlike the SQL MM specification, this method does not use z-coordinate values in calculating the polygonal approximation. Any z-coordinate values present in the calling geography instance are ignored.

Examples

The following example returns a LineString instance that is a polygonal approximation of a CircularString instance:

DECLARE @g1 geography = 'CIRCULARSTRING(-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653)';

DECLARE @g2 geography;

SET @g2 = @g1.STCurveToLine();

SELECT @g1.STNumPoints() AS G1, @g2.STNumPoints() AS G2;

See Also

Reference

STLength (geography Data Type)

STNumPoints (geography Data Type)

Concepts

Spatial Data Types Overview