SQL Flow Field Guide

geography.STConvexHull

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

spatial method STConvexHull (instance.STConvexHull(...))

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

.STConvexHull ( )

Work example

Use geography.STConvexHull to return the smallest convex shape enclosing the input.

Use it as a broad summary and keep the source when concavities matter. Keep the geography type and SRID in the review.

Check your work The hull encloses all three points and contains no inward concavity.

Practice SQL

Open in SQL Flow

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

SELECT p.shape.STConvexHull().STGeometryType() AS hull_type, p.shape.STConvexHull().STAsText() AS hull_wkt FROM (VALUES (geography::STGeomFromText('MULTIPOINT(-122.360 47.653, -122.348 47.649, -122.348 47.658)', 4326))) AS p(shape);

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