moveGeodetic static method

List<ArcGISPoint> moveGeodetic(
  1. {required List<ArcGISPoint> pointCollection,
  2. required double distance,
  3. LinearUnit? distanceUnit,
  4. required double azimuth,
  5. AngularUnit? azimuthUnit,
  6. required GeodeticCurveType curveType}
)

Moves each point in the point collection in a specified direction by a geodetic distance.

The returned collection is in the same order as the input, but with new points at their destination locations. Specifying a negative distance moves points in the opposite direction from azimuth.

Parameters:

  • pointCollection — A List of ArcGISPoint geometries. Contents of the List are copied.
  • distance — The distance to move the points.
  • distanceUnit — The unit of measure for distance. If null, meters are assumed.
  • azimuth — The azimuth angle of the direction for the points.
  • azimuthUnit — The angular unit of measure for azimuth. If null, degrees are assumed.
  • curveType — The type of curve to calculate.

Return Value: A new collection of points moved by the given distance from the input collection.

Implementation

static List<ArcGISPoint> moveGeodetic(
    {required List<ArcGISPoint> pointCollection,
    required double distance,
    LinearUnit? distanceUnit,
    required double azimuth,
    AngularUnit? azimuthUnit,
    required GeodeticCurveType curveType}) {
  _initializeArcGISEnvironmentIfNeeded();
  final corePointCollection =
      pointCollection.toMutableArray(valueType: _ElementType.geometry);
  final arrayHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_GeometryEngine_moveGeodetic(
        corePointCollection._handle,
        distance,
        distanceUnit?._handle ?? ffi.nullptr,
        azimuth,
        azimuthUnit?._handle ?? ffi.nullptr,
        curveType.coreValue,
        errorHandler);
  });
  return arrayHandle.toList();
}