ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Geometry Namespace / IGeometryEngine Interface / GeodesicArea Method / GeodesicArea(Geometry) Method
The input geometry. Cannot be null and its spatial reference cannot be null.
Example

In This Topic
    GeodesicArea(Geometry) Method
    In This Topic
    Gets the geodesic area of a geometry.
    Syntax
    double GeodesicArea( 
       Geometry geometry
    )
    Overloads Function GeodesicArea( _
       ByVal geometry As Geometry _
    ) As Double

    Parameters

    geometry
    The input geometry. Cannot be null and its spatial reference cannot be null.

    Return Value

    The calculated geodesic area in square meters. If the geometry is empty, then zero is returned.
    Exceptions
    ExceptionDescription
    Geometry is null or geometry's spatial reference is null.
    The method is not implemented for GeometryBag or Multipatch.
    Spatial reference of geometryis an image coordinate system.
    Example
    Calculate the Geodesic Area of a polygon
    var polygon = PolygonBuilderEx.CreatePolygon(new[]
    {
      MapPointBuilderEx.CreateMapPoint(-10018754.1713946, 10018754.1713946),
      MapPointBuilderEx.CreateMapPoint(10018754.1713946, 10018754.1713946),
      MapPointBuilderEx.CreateMapPoint(10018754.1713946, -10018754.1713946),
      MapPointBuilderEx.CreateMapPoint(-10018754.1713946, -10018754.1713946)
    }, SpatialReferences.WebMercator);
    var area = GeometryEngine.Instance.GeodesicArea(polygon);
    
    // area is close to 255032810857732.31
    
    area = GeometryEngine.Instance.GeodesicArea(polygon, AreaUnit.SquareKilometers);
    // area is close to 255032810.85953, 
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also