# Envelope

A geometry that represents a rectangular shape. An Envelope is an axis-aligned box described by the coordinates of the lower left corner and the coordinates of the upper right corner. They are commonly used to represent the spatial extent covered by layers or other geometries, or to define an area of interest. They can be used as the geometry for a graphic and as an input for many spatial operations. Although they both represent a geographic area, an Envelope is distinct from a Polygon, and they cannot always be used interchangeably.

New instances of Envelope are defined by specifying a minimum and maximum x-coordinate and minimum and maximum y-coordinate, and a SpatialReference. Optionally, a minimum and maximum z-value can be specified to define the depth of the envelope.

200.1.0

## Constructors

constructor(min: Point, max: Point)

Creates an envelope from any two points. The spatial reference of the points must be the same. The spatial reference of the result envelope comes from the points. 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.

constructor(xMin: Double, yMin: Double, xMax: Double, yMax: Double, zMin: Double? = null, zMax: Double? = null, mMin: Double? = null, mMax: Double? = null, spatialReference: SpatialReference? = null)

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

constructor(center: Point, width: Double, height: Double, depth: Double? = null)

Creates an envelope with a center point, width, height, and depth. The spatial reference of the resulting envelope comes from the center point.

object Companion

## Properties

The center point for the envelope. Creates a new Point.

The depth (ZMax - ZMin) for the envelope. A 2D envelope has zero depth. The property will be NaN if the envelope is empty or if an error occurs. A value of Null indicates that the envelope does not have z-values.

The height for the envelope. Returns NAN if an error occurs.

val mMax: Double?

The m maximum value for the envelope. The property will be NaN if an error occurs. A value of Null indicates that the envelope does not have a m maximum value.

val mMin: Double?

The m minimum value for the envelope. The property will be NaN if an error occurs. A value of Null indicates that the geometry does not have a m minimum value.

The width for the envelope. Returns NAN if an error occurs.

The x maximum value for the envelope. Returns NAN if an error occurs.

The x minimum value for the envelope. Returns NAN if an error occurs.

The y maximum value for the envelope. Returns NAN if an error occurs.

The y minimum value for the envelope. Returns NAN if an error occurs.

val zMax: Double?

The z maximum value for the envelope. The property will be NaN if an error occurs. A value of Null indicates that the envelope does not have a z maximum value.

val zMin: Double?

The z minimum value for the envelope. The property will be NaN if an error occurs. A value of Null indicates that the envelope does not have a z minimum value.

## Inherited properties

Indicates the dimensionality of a Geometry, relating to the number of spatial dimensions in which the geometry may have a size. You can use Geometry.dimension to work out what kind of symbol can be applied to a specific type of geometry. For example, Point and Multipoint are both zero-dimensional point geometries, and both can be displayed using a type of MarkerSymbol. Polygon and Envelope are both 2-dimensional area geometries that can be displayed using a type of FillSymbol.

The minimum enclosing bounding-box (or Envelope) that covers the geometry.

True if this geometry contains curve segments, false otherwise. ArcGIS software supports polygon and polyline geometries that contain curve segments (where Segment.isCurve is true, sometimes known as true curves or nonlinear segments). Curves may be present in certain types of data, such as Mobile Map Packages (MMPK) or geometry JSON. When connecting to ArcGIS feature services that support curves (see ArcGISFeatureServiceInfo.supportsTrueCurve), this API retrieves densified versions of curve feature geometries by default.

True if the geometry has m values (measure values), false otherwise. M is a vertex value that is stored with the geometry. These values typically represent non-spatial measurements or attributes.

True if the geometry has z-coordinate values, false otherwise. Only 3D geometries contain z-coordinate values. These values typically represent elevation, height, or depth.

True if the geometry is empty, false otherwise. A geometry is empty if it does not have valid geographic coordinates, even if the SpatialReference is specified. An empty Geometry is a valid object that has no location in space.

The spatial reference for this geometry. This can be null if the geometry is not associated with a SpatialReference.

## Functions

open override fun toString(): String