SQL Flow Field Guide

geography.STNumCurves

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

spatial method STNumCurves (instance.STNumCurves(...))

What changes

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

Syntax at a glance

.STNumCurves()

Work example

Use geography.STNumCurves to count curve components in a supported instance.

Check that the input uses a supported curve type. Keep the geography type and SRID in the review.

Check your work The five-point CircularString defines two circular arcs, so the curve count is 2.

Practice SQL

Open in SQL Flow

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

SELECT c.shape.STNumCurves() AS curve_count FROM (VALUES (geography::Parse('CIRCULARSTRING(-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653)'))) AS c(shape);

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