STCurveToLine (geography Data Type)

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)yesAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

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



Return Types

SQL Server return type: geography

CLR return type: SqlGeography


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.


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

STLength (geography Data Type)
STNumPoints (geography Data Type)
Spatial Data Types Overview