Skip To Content ArcGIS for Developers Sign In Dashboard

Envelope Class

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: Esri::ArcGISRuntime::Geometry

This class was introduced in Esri::ArcGISRuntime 100.0.

Public Functions

Envelope(const Esri::ArcGISRuntime::Geometry &other)
Envelope(Esri::ArcGISRuntime::Envelope &&other)
Envelope(const Esri::ArcGISRuntime::Envelope &other)
Envelope(const Esri::ArcGISRuntime::Point &centerPoint, double width, double height, double depth)
Envelope(const Esri::ArcGISRuntime::Point &centerPoint, double width, double height)
Envelope(const Esri::ArcGISRuntime::Point &corner1, const Esri::ArcGISRuntime::Point &corner2)
Envelope(double xMin, double yMin, double xMax, double yMax, double zMin, double zMax, const Esri::ArcGISRuntime::SpatialReference &spatialReference)
Envelope(double xMin, double yMin, double xMax, double yMax, double zMin, double zMax)
Envelope(double xMin, double yMin, double xMax, double yMax, const Esri::ArcGISRuntime::SpatialReference &spatialReference)
Envelope(double xMin, double yMin, double xMax, double yMax)
Envelope()
Esri::ArcGISRuntime::Envelope &operator=(const Esri::ArcGISRuntime::Geometry &other)
Esri::ArcGISRuntime::Envelope &operator=(Esri::ArcGISRuntime::Envelope &&other)
Esri::ArcGISRuntime::Envelope &operator=(const Esri::ArcGISRuntime::Envelope &other)
virtual ~Envelope() override
Esri::ArcGISRuntime::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

Static Public Members

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

Detailed Description

An Envelope is an axis-aligned box described by the coordinates of the lower left corner and the coordinates of the upper right corner. 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.

Envelopes 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 an Envelope and a Polygon both represent a geographic area, they are distinct and cannot always be used interchangeably. An Envelope cannot be used as the Geometry for a feature.

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

Member Function Documentation

Envelope::Envelope(const Esri::ArcGISRuntime::Geometry &other)

Converting constructor from other Geometry.

See also Downcast helper functions.

Envelope::Envelope(Esri::ArcGISRuntime::Envelope &&other)

Move constructor from other Envelope.

Envelope::Envelope(const Esri::ArcGISRuntime::Envelope &other)

Copy constructor from other Envelope.

Envelope::Envelope(const Esri::ArcGISRuntime::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 Esri::ArcGISRuntime::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 Esri::ArcGISRuntime::Point &corner1, const Esri::ArcGISRuntime::Point &corner2)

Constructs a new Envelope using corner points.

corner1 and corner2 represent opposite corners of the Envelope.

Envelope::Envelope(double xMin, double yMin, double xMax, double yMax, double zMin, double zMax, const Esri::ArcGISRuntime::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(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, const Esri::ArcGISRuntime::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)

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()

Default constructor. Creates an empty Envelope.

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

Assignment operator from other Geometry.

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

Move operator from other Envelope.

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

Assignment operator from other Envelope.

[override virtual] Envelope::~Envelope()

Destructor

Esri::ArcGISRuntime::Point Envelope::center() const

Gets a Point representing the center of the Envelope.

[static] Esri::ArcGISRuntime::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] Esri::ArcGISRuntime::Envelope Envelope::createWithM(double xMin, double yMin, double xMax, double yMax, double mMin, double mMax, const Esri::ArcGISRuntime::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] Esri::ArcGISRuntime::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] Esri::ArcGISRuntime::Envelope Envelope::createWithM(double xMin, double yMin, double xMax, double yMax, double zMin, double zMax, double mMin, double mMax, const Esri::ArcGISRuntime::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.


Feedback on this topic?