ArcGISPoint constructor

ArcGISPoint({
  1. required double x,
  2. required double y,
  3. double? z,
  4. double? m,
  5. SpatialReference? spatialReference,
})

Creates a point with an x, y, z, m and a spatial reference.

The minimum z-value is -6,356,752 meters, which is the approximate radius of the earth (the WGS 84 datum semi-minor axis). The maximum z-value is 55,000,000 meters.

Parameters:

  • x — The x-coordinate for the point.
  • y — The y-coordinate for the point.
  • z — The z-coordinate for the point.
  • m — The m-value for the point.
  • spatialReference — The spatial reference for the point.

Implementation

factory ArcGISPoint({
  required double x,
  required double y,
  double? z,
  double? m,
  SpatialReference? spatialReference,
}) {
  _initializeArcGISEnvironmentIfNeeded();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_Point_createCombined(
      x,
      y,
      z,
      m,
      spatialReference?._handle ?? ffi.nullptr,
      errorHandler,
    );
  });
  final ArcGISPoint object = ArcGISPoint._withHandle(handle);
  object._spatialReference.cache(spatialReference);
  return object;
}