Skip To Content ArcGIS for Developers Sign In Dashboard

Envelope Class

(Esri::ArcGISRuntime::Envelope)

Represents a rectangular area, defined by a minimum and maximum x-coordinate and a minimum and maximum y-coordinate, and a spatial reference. More...

Header: #include <Envelope>
Since: Esri::ArcGISRuntime 100.0
Inherits: Geometry

Public Functions

Envelope()
Envelope(double xMin, double yMin, double xMax, double yMax)
Envelope(double xMin, double yMin, double xMax, double yMax, const SpatialReference &spatialReference)
Envelope(double xMin, double yMin, double xMax, double yMax, double zMin, double zMax)
Envelope(double xMin, double yMin, double xMax, double yMax, double zMin, double zMax, const SpatialReference &spatialReference)
Envelope(const Point &corner1, const Point &corner2)
Envelope(const Point &centerPoint, double width, double height)
Envelope(const Point &centerPoint, double width, double height, double depth)
Envelope(const Envelope &other)
Envelope(Envelope &&other)
Envelope(const Geometry &other)
~Envelope()
Point center() const
double depth() const
double height() const
bool isValid() const
double mMax() const
double mMin() const
double width() const
double xMax() const
double xMin() const
double yMax() const
double yMin() const
double zMax() const
double zMin() const
Envelope &operator=(const Envelope &other)
Envelope &operator=(Envelope &&other)
Envelope &operator=(const Geometry &other)

Static Public Members

Envelope createWithM(double xMin, double yMin, double xMax, double yMax, double mMin, double mMax)
Envelope createWithM(double xMin, double yMin, double xMax, double yMax, double mMin, double mMax, const SpatialReference &spatialReference)
Envelope createWithM(double xMin, double yMin, double xMax, double yMax, double zMin, double zMax, double mMin, double mMax)
Envelope createWithM(double xMin, double yMin, double xMax, double yMax, double zMin, double zMax, double mMin, double mMax, const SpatialReference &spatialReference)

Detailed Description

Represents a rectangular area, defined by a minimum and maximum x-coordinate and a minimum and maximum y-coordinate, and a spatial reference.

Envelopes can optionally have minimum and maximum z (height) and m (measure) attributes.

The sides of an Envelope align with the axes of its spatial reference. If the spatial reference is a geographic coordinate system, the x-coordinates relate to longitude and the y-coordinates relate to latitude.

Envelope is immutable. Instead of changing the properties of an existing Envelope, create new Envelope instances, or use EnvelopeBuilder.

Envelopes cannot be used as the Geometry of a Feature.

Member Function Documentation

Envelope::Envelope()

Default constructor. Creates an empty Envelope.

Envelope::Envelope(double xMin, double yMin, double xMax, double yMax)

Constructs a new Envelope using coordinates representing the minimum and maximum x,y coordinates.

  • xMin - Minimum x-coordinate.
  • yMin - Minimum y-coordinate.
  • xMax - Maximum x-coordinate.
  • yMax - Maximum y-coordinate.

Envelope::Envelope(double xMin, double yMin, double xMax, double yMax, const SpatialReference &spatialReference)

Constructs a new Envelope using coordinates representing the minimum and maximum x,y coordinates.

  • xMin - Minimum x-coordinate.
  • yMin - Minimum y-coordinate.
  • xMax - Maximum x-coordinate.
  • yMax - Maximum y-coordinate.
  • spatialReference - Spatial reference.

Envelope::Envelope(double xMin, double yMin, double xMax, double yMax, double zMin, double zMax)

Constructs a new Envelope using coordinates representing the minimum and maximum x, y and z coordinates.

  • xMin - Minimum x-coordinate.
  • yMin - Minimum y-coordinate.
  • xMax - Maximum x-coordinate.
  • yMax - Maximum y-coordinate.
  • zMin - Minimum z-coordinate.
  • zMax - Maximum z-coordinate.

Envelope::Envelope(double xMin, double yMin, double xMax, double yMax, double zMin, double zMax, const SpatialReference &spatialReference)

Constructs a new Envelope using coordinates representing the minimum and maximum x/y/z-coordinates, and the spatial reference of the provided coordinates.

  • xMin - Minimum x-coordinate.
  • yMin - Minimum y-coordinate.
  • xMax - Maximum x-coordinate.
  • yMax - Maximum y-coordinate.
  • zMin - Minimum z-coordinate.
  • zMax - Maximum z-coordinate.
  • spatialReference - Spatial reference.

Envelope::Envelope(const Point &corner1, const Point &corner2)

Constructs a new Envelope using corner points.

corner1 and corner2 represent opposite corners of the Envelope.

Envelope::Envelope(const Point &centerPoint, double width, double height)

Creates an envelope from a center point and a width and height.

  • centerPoint - The center point for the envelope.
  • width - The width of the envelope around the center point.
  • height - The height of the envelope around the center point.

This function was introduced in Esri::ArcGISRuntime 100.6.

Envelope::Envelope(const Point &centerPoint, double width, double height, double depth)

Creates an envelope from a center point and a width, height, and depth.

  • centerPoint - The center point for the envelope.
  • width - The width of the envelope around the center point.
  • height - The height of the envelope around the center point.
  • depth - The depth of the envelope around the center point.

This function was introduced in Esri::ArcGISRuntime 100.6.

Envelope::Envelope(const Envelope &other)

Copy constructor from other Envelope.

Envelope::Envelope(Envelope &&other)

Move constructor from other Envelope.

Envelope::Envelope(const Geometry &other)

Converting constructor from other Geometry.

See also Downcast helper functions.

Envelope::~Envelope()

Destructor

Point Envelope::center() const

Gets a Point representing the center of the Envelope.

[static] Envelope Envelope::createWithM(double xMin, double yMin, double xMax, double yMax, double mMin, double mMax)

Creates a new Envelope with m values using coordinates representing the minimum and maximum x, y and m.

  • xMin - Minimum x-coordinate.
  • yMin - Minimum y-coordinate.
  • xMax - Maximum x-coordinate.
  • yMax - Maximum y-coordinate.
  • mMin - Minimum m value.
  • mMax - Maximum m value.

Returns a new Envelope with the specified coordinates and m values.

[static] Envelope Envelope::createWithM(double xMin, double yMin, double xMax, double yMax, double mMin, double mMax, const SpatialReference &spatialReference)

Creates a new Envelope with m values using coordinates representing the minimum and maximum x, y, m, and the spatial reference of the provided coordinates.

  • xMin - Minimum x-coordinate.
  • yMin - Minimum y-coordinate.
  • xMax - Maximum x-coordinate.
  • yMax - Maximum y-coordinate.
  • mMin - Minimum m value.
  • mMax - Maximum m value.
  • spatialReference - Spatial reference.

Returns a new Envelope with the specified coordinates and m values in the specified spatial reference.

[static] Envelope Envelope::createWithM(double xMin, double yMin, double xMax, double yMax, double zMin, double zMax, double mMin, double mMax)

Creates a new Envelope with m values using coordinates representing the minimum and maximum x, y, z and m.

  • xMin - Minimum x-coordinate.
  • yMin - Minimum y-coordinate.
  • xMax - Maximum x-coordinate.
  • yMax - Maximum y-coordinate.
  • zMin - Minimum z-coordinate.
  • zMax - Maximum z-coordinate.
  • mMin - Minimum m value.
  • mMax - Maximum m value.

Returns a new Envelope with the specified coordinates and m values.

[static] Envelope Envelope::createWithM(double xMin, double yMin, double xMax, double yMax, double zMin, double zMax, double mMin, double mMax, const SpatialReference &spatialReference)

Creates a new Envelope with m values using coordinates representing the minimum and maximum x, y, z, m and the spatial reference of the provided coordinates.

  • xMin - Minimum x-coordinate.
  • yMin - Minimum y-coordinate.
  • xMax - Maximum x-coordinate.
  • yMax - Maximum y-coordinate.
  • zMin - Minimum z-coordinate.
  • zMax - Maximum z-coordinate.
  • mMin - Minimum m value.
  • mMax - Maximum m value.
  • spatialReference - Spatial reference.

Returns a new Envelope with the specified coordinates and m values in the specified spatial reference.

double Envelope::depth() const

Returns the depth (zMax - zMin) of the envelope.

A 2D envelope has zero depth.

This function was introduced in Esri::ArcGISRuntime 100.1.

double Envelope::height() const

Gets the height.

bool Envelope::isValid() const

Gets whether this Envelope is valid.

A Envelope is valid if it is not empty and geometryType is GeometryType::Envelope.

Returns true if valid.

This function was introduced in Esri::ArcGISRuntime 100.2.

double Envelope::mMax() const

Gets the maximum m value(Measure).

double Envelope::mMin() const

Gets the minimum m value(Measure).

double Envelope::width() const

Gets the width.

double Envelope::xMax() const

Gets the maximum x-coordinate.

double Envelope::xMin() const

Returns the minimum x-coordinate.

double Envelope::yMax() const

Gets the maximum y-coordinate.

double Envelope::yMin() const

Gets the minimum y-coordinate.

double Envelope::zMax() const

Gets the maximum z-coordinate.

double Envelope::zMin() const

Gets the minimum z-coordinate.

Envelope &Envelope::operator=(const Envelope &other)

Assignment operator from other Envelope.

Envelope &Envelope::operator=(Envelope &&other)

Move operator from other Envelope.

Envelope &Envelope::operator=(const Geometry &other)

Assignment operator from other Geometry.


Feedback on this topic?