Envelope.fromXYZ constructor
Creates an envelope based on x, y, and z values with the 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.spatialReference
— The spatial reference for the envelope.
Implementation
factory Envelope.fromXYZ({
required double xMin,
required double yMin,
required double xMax,
required double yMax,
required double zMin,
required double zMax,
SpatialReference? spatialReference,
}) {
_initializeArcGISEnvironmentIfNeeded();
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_Envelope_createWithXYZSpatialReference(
xMin,
yMin,
xMax,
yMax,
zMin,
zMax,
spatialReference?._handle ?? ffi.nullptr,
errorHandler,
);
});
final Envelope object = Envelope._withHandle(handle);
object._spatialReference.cache(spatialReference);
return object;
}