Parameters
- geometry
- The intput geometry.
Return Value
The calculated geodesic area. The area returned is in square meters.
Exception | Description |
---|---|
System.ArgumentNullException | Geometry is null or empty. |
System.NotImplementedException | The method is not implemented for GeometryBag or Multipatch. |
GeometryObjectException | Geometry is of the wrong type (e.g. a polyline). |
System.NotImplementedException | Spatial reference of geometryis an image coordinate system. |
var polygon = PolygonBuilder.CreatePolygon(new[] { MapPointBuilder.CreateMapPoint(-10018754.1713946, 10018754.1713946), MapPointBuilder.CreateMapPoint(10018754.1713946, 10018754.1713946), MapPointBuilder.CreateMapPoint(10018754.1713946, -10018754.1713946), MapPointBuilder.CreateMapPoint(-10018754.1713946, -10018754.1713946) }, SpatialReferences.WebMercator); var area = GeometryEngine.Instance.GeodesicArea(polygon); // area is close to 255032810857732.31
Target Platforms: Windows 10, Windows 8.1