# What exactly does STArea() of a geometry object return on a multipolygon geometry?

• ### Question

• I have two SQlGeometries that were created using SqlGeometryBuilder. these geometries could be multipolygon shapes. I then use

GeomIntersect = zipgeom.MakeValid().STIntersection(countygeom.MakeValid());

to intersect these two geometries and come up with the intersection of the two geometries. GeomIntersect is now the resulting multipolygon geometry. Would GeomIntersect.STArea() return me the total area of the resulting multipolygon? It does not apear to be doing that. How do I get the resulting area of the intersection if not STArea()? Any help would be appreciated. Also, the area returned seems to be in Radians. How do I get that in metrix?

Wednesday, May 4, 2011 4:42 AM

• The result of STArea() on a MultiPolygon instance is the sum of the areas of all the individual Polygons in the MultiPolygon.

The area itself is expressed in the same units as the coordinates the you supplied for the geometry. So, if you're using a coordinate system where coordinate values are measured in metres, the area will be measured in metres squared. If your coordinates were supplied in feet, the area will be feet squared.

I suspect what you've done is to use the geometry datatype but supplied coordinates as latitude/longitude degrees, in which case the resulting area will be measured in degrees squared. To get a metric result for the geometry datatype, supply metric coordinates. Otherwise, if you want to supply degrees but get metric areas, use the geography datatype.

• Marked as answer by Thursday, May 5, 2011 8:11 PM
Wednesday, May 4, 2011 7:47 AM

### All replies

• The result of STArea() on a MultiPolygon instance is the sum of the areas of all the individual Polygons in the MultiPolygon.

The area itself is expressed in the same units as the coordinates the you supplied for the geometry. So, if you're using a coordinate system where coordinate values are measured in metres, the area will be measured in metres squared. If your coordinates were supplied in feet, the area will be feet squared.

I suspect what you've done is to use the geometry datatype but supplied coordinates as latitude/longitude degrees, in which case the resulting area will be measured in degrees squared. To get a metric result for the geometry datatype, supply metric coordinates. Otherwise, if you want to supply degrees but get metric areas, use the geography datatype.