SQL Flow Field Guide

geography.EnvelopeCenter

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

spatial method EnvelopeCenter (instance.EnvelopeCenter(...))

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

EnvelopeCenter( )

Work example

Use geography.EnvelopeCenter to find the center of a geography envelope.

Use it as an extent summary and check that it suits the rendered map. Keep the geography type and SRID in the review.

Check your work The named output is the center point of the geography instance's bounding circle.

Practice SQL

Open in SQL Flow

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

SELECT r.shape.EnvelopeCenter().STAsText() AS envelope_center_wkt FROM (VALUES (geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326))) AS r(shape);

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