Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

STArea (geography Data Type)

Returns the total surface area of a geography instance. Results for STArea() are returned in the square of the unit of measure used by the spatial reference identifier of the geography instance; for example, if the SRID of the instance is 4326, STArea() returns results in square meters.


.STArea ( )

SQL Server return type: float

CLR return type: SqlDouble

STArea() returns 0 if a geography instance contains only 0- and 1-dimensional figures, or if it is empty.

NoteNote

Methods on the geography data type that produce a metric return value will have different results based on the SRID of the instance used in the method. For more information on SRIDs, see Spatial Reference Identifiers (SRIDs).

The following example uses STArea() to create a Polygon geography instance and computes the area of the polygon.

DECLARE @g geography;
SET @g = geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326);
SELECT @g.STArea();
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.