Parameters
- geometry
- The intput geometry.
Return Value
The calculated geodesic area in square meters. If the geometry is empty, then zero is returned.
Exception | Description |
---|---|
System.ArgumentNullException | Geometry is null. |
System.NotImplementedException | The method is not implemented for GeometryBag or Multipatch. |
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