geography.STArea
spatial method STArea (instance.STArea(...))
What changes
- Input
- spatial instance (and arguments)
- Output or change
- float
- Return type
- SQL Server return type: float CLR return type: SqlDouble
Syntax at a glance
.STArea ( )
Work example
Use geography.STArea to measure enclosed area.
For geometry record coordinate units. For geography check SRID units. Keep the geography type and SRID in the review.
Check your work Area uses coordinate units squared for geometry and typically square metres for geography. Check the returned value before using it downstream. For this geography result, verify the instance SRID before interpreting its coordinates.
Practice SQL
Open in SQL FlowSELECT geography::STGeomFromText('POLYGON ((0 0, 0.01 0, 0.01 0.01, 0 0.01, 0 0))', 4326).STArea() AS square_metres;
Open Microsoft Learn for full syntax, permissions, and details for your version.