ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Geometry Namespace / IGeometryEngine Interface / GeodesicEllipse Method
The geodesic ellipse parameter that describes how to create the geodesic ellipse.
Example

In This Topic
    GeodesicEllipse Method (IGeometryEngine)
    In This Topic
    The function returns a piecewise approximation of a geodesic ellipse (or geodesic circle, if semiAxis1Length = semiAxis2Length). Constructs a geodesic ellipse centered on the specified point. If this method is used to generate a polygon or a polyline, the result may have more than one part, depending on the size of the ellipse and its position relative to the horizon of the coordinate system. When the method generates a polyline or a multipoint, the result vertices lie on the boundary of the ellipse. When a polygon is generated, the interior of the polygon is the interior of the ellipse, however the boundary of the polygon may contain segments from the spatial reference horizon, or from the GCS extent.
    Syntax

    Parameters

    parameter
    The geodesic ellipse parameter that describes how to create the geodesic ellipse.
    spatialReference

    Return Value

    The geometry that contains the geodesic ellipse.
    Exceptions
    ExceptionDescription
    Only Polygon, Polyline and Multipoint are supported for GeodesicEllipseParameter.OutGeometryType.
    Either parameteror spatialReference is null.
    The spatial reference is an image coordinate system.
    Remarks
    If the smaller axis is zero, the ellipse will degenerate to a line segment, a point, or an empty geometry (depending on the larger axis and output type). Otherwise, if VertextCount < 10, the number of vertices will default to 10.
    Example
    GeodesicEllipse
    GeodesicEllipseParameter param = new GeodesicEllipseParameter();
    param.AxisDirection = 4 * Math.PI / 3;
    param.Center = new Coordinate2D(-120, 60);
    param.LinearUnit = LinearUnit.Meters;
    param.OutGeometryType = GeometryType.Polyline;
    param.SemiAxis1Length = 6500000;
    param.SemiAxis2Length = 1500000;
    param.VertexCount = 800;
    
    Geometry geometry = GeometryEngine.Instance.GeodesicEllipse(param, SpatialReferences.WGS84);
    // geometry.IsEmpty = false
    
    Polyline polyline = geometry as Polyline;
    // polyline.PointCount = 801
    // polyline.PartCount = 1
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also