ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Geometry Namespace / IGeometryEngine Interface / GeodeticMove Method
The points that are to be moved.
The spatial reference of the points.
The distance by which the points will be moved.
The unit of the distance property.
The azimuth angle in radians of the direction for the points.
The type of curve to follow when moving the points.
Example

In This Topic
    GeodeticMove Method (IGeometryEngine)
    In This Topic
    Moves each point in the input array by the given distance. The function returns the number of points that has been moved. Points that are outside of the horizon will be discarded.
    Syntax

    Parameters

    points
    The points that are to be moved.
    spatialReference
    The spatial reference of the points.
    distance
    The distance by which the points will be moved.
    distanceUnit
    The unit of the distance property.
    azimuth
    The azimuth angle in radians of the direction for the points.
    curveType
    The type of curve to follow when moving the points.

    Return Value

    The number of points moved. Points outside of the horizon will be discarded.
    Exceptions
    ExceptionDescription
    Points is null or empty. Or spatialReference is null.
    The method is not implemented for GeometryBag.
    The spatial reference is an image coordinate system.
    Example
    Perform Geodetic Move on a set of MapPoints
    SpatialReference sr = SpatialReferences.WebMercator;
    var points = new[] { MapPointBuilderEx.CreateMapPoint(0, 0, sr) };
    double distance = 10;
    double azimuth = Math.PI / 2;
    var resultPoints = GeometryEngine.Instance.GeodeticMove(points, sr, distance, LinearUnit.Meters, azimuth, GeodeticCurveType.Geodesic);
    
    // resultPoints.First().X = 10
    // resultPoints.First().Y = 0
    // resultPoints.First().SpatialReference.Wkid = sr.Wkid
    
    // Change LinearUnit to Miles
    resultPoints = GeometryEngine.Instance.GeodeticMove(points, sr, distance, LinearUnit.Miles, azimuth, GeodeticCurveType.Geodesic);
    // resultPoints.First().X = 16093.44
    // resultPoints.First().Y = 0
    
    // Change curve type
    resultPoints = GeometryEngine.Instance.GeodeticMove(points, sr, distance, LinearUnit.Miles, azimuth, GeodeticCurveType.Loxodrome);
    // resultPoints.First().X = 16093.44
    // resultPoints.First().Y = 0
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also