Envelope.fromXYZM constructor

Envelope.fromXYZM({
  1. required double xMin,
  2. required double yMin,
  3. required double xMax,
  4. required double yMax,
  5. required double zMin,
  6. required double zMax,
  7. required double mMin,
  8. required double mMax,
  9. SpatialReference? spatialReference,
})

Creates an envelope based on the x, y, z and m values with a spatial reference.

If the values for min parameters are bigger than max parameters then they are re-ordered. The resulting envelope always has min less than or equal to max.

Parameters:

  • xMin — The minimal x-value.
  • yMin — The minimal y-value.
  • xMax — The maximum x-value.
  • yMax — The maximum y-value.
  • zMin — The minimal z-value.
  • zMax — The maximum z-value.
  • mMin — The minimal m-value.
  • mMax — The maximum m-value.
  • spatialReference — The spatial reference for the envelope.

Implementation

factory Envelope.fromXYZM({
  required double xMin,
  required double yMin,
  required double xMax,
  required double yMax,
  required double zMin,
  required double zMax,
  required double mMin,
  required double mMax,
  SpatialReference? spatialReference,
}) {
  _initializeArcGISEnvironmentIfNeeded();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_Envelope_createWithZMSpatialReference(
      xMin,
      yMin,
      xMax,
      yMax,
      zMin,
      zMax,
      mMin,
      mMax,
      spatialReference?._handle ?? ffi.nullptr,
      errorHandler,
    );
  });
  final Envelope object = Envelope._withHandle(handle);
  object._spatialReference.cache(spatialReference);
  return object;
}