Click or drag to resize

GeometryEngineArea Method

Gets the simple area for the Geometry passed in. This is a planar measurement using 2D Cartesian mathematics to compute the area. Use AreaGeodetic(Geometry, AreaUnit, GeodeticCurveType) for geodetic measurement.

Namespace:  Esri.ArcGISRuntime.Geometry
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.9.0
Syntax
public static double Area(
	Geometry geometry
)

Parameters

geometry
Type: Esri.ArcGISRuntime.GeometryGeometry
The geometry to calculate the area for.

Return Value

Type: Double
The computed area in the same units as the geometry's spatial reference unit.
Remarks

Planar measurements of distance and area can be extremely inaccurate if using an unsuitable spatial reference. Ensure that you understand the potential for error with the geometry's spatial reference. If you need to calculate more accurate results consider using a different spatial reference, or using the geodetic equivalent, AreaGeodetic(Geometry, AreaUnit, GeodeticCurveType). See Introduction to Spatial References for more information about spatial references.

The area calculation that is generated from this Static Method is based upon the SpatialReference of the input geometry. A SpatialReference is a combination of an ellipsoid, datum, and a coordinate system used to display (aka. project) geographic data of the three dimensional Earth on a two dimensional surface (such as a piece of paper of computer monitor). A good article for describing how a spatial reference works can be found here. The important thing to know about area calculations is that some SpatialReferences are better than others for getting an accurate results. To get the best area calculations using this method, consider using an 'area preserving' projecting SpatialReference such as: Albers, Lambert, Mollweide, Hammer, Sinusoidal, and the like. If the input geometry to this method is not a good 'area preserving' projecting SpatialReference, then there are two options available to get a good area calculation: (1) use the Project(Geometry, SpatialReference) Static Method to project the geometry to one that is better suited for area calculations or (2) use the AreaGeodetic(Geometry, AreaUnit, GeodeticCurveType) Static Method which will use an internal projection algorithm to convert the geometry to a spherical coordinate system to obtain the best area calculation possible.

The input geometry must be topologically correct to get its accurate area. There are many ways that the orientation or shape of the rings that comprise polygon could be constructed: clock-wise, counter clock-wise, overlapping hourglass, doughnut, multiple independent rings, etc. If the geometry is not topologically correct, then the resultant area from this method could give negative results. It is always a good best practice to use the Simplify(Geometry) Static Method on the geometry such that the resulting geometry is topologically correct and will return accurate and positive area results. Geometries returned by ArcGIS Server services are always correct. Therefore, if you construct geometries programmatically or using the sketch layer, or if you modify geometries returned by ArcGIS Server, you should always simplify them using GeometryEngine.Simplify first.

See Also