SQL Flow Field Guide

geometry.STCurveToLine

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

spatial method STCurveToLine (instance.STCurveToLine(...))

What changes

Input
spatial instance (and arguments)
Output or change
geometry
Return type
SQL Server return type: geometry CLR return type: SqlGeometry

Syntax at a glance

.STCurveToLine ( )

Work example

Use geometry.STCurveToLine to convert curve segments to straight segments.

Set tolerance for the target scale and retain the source when curve fidelity matters. Keep the geometry type and SRID in the review.

Check your work The output approximates the arc with straight segments in the same planar frame.

Practice SQL

Open in SQL Flow

Open the SQL for a walkthrough. Run the example in SQL Server to check its result.

-- Planar geometry. SRID 0 coordinates here are synthetic units, not metres.
DECLARE @shape geometry;
SET @shape = geometry::STGeomFromText(N'CIRCULARSTRING(0 0, 2 2, 4 0)', 0);
SELECT @shape.STCurveToLine().STAsText() AS linearized_curve,
       @shape.STSrid AS source_srid,
       @shape.STIsValid() AS source_is_valid;

Open Microsoft Learn for full syntax, permissions, and details for your version.