Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

STArea (geometry Data Type)

Returns the total surface area of a geometry instance.


.STArea ( )

SQL Server return type: float

CLR return type: SqlDouble

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

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

DECLARE @g geometry;
SET @g = geometry::STGeomFromText('POLYGON((0 0, 3 0, 3 3, 0 3, 0 0),(2 2, 2 1, 1 1, 1 2, 2 2))', 0);
SELECT @g.STArea();

Community Additions

ADD
Show:
© 2015 Microsoft