Represents a rectangle, with sides parallel to the coordinate system.

Namespace:  ESRI.ArcGISExplorer.Geometry

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public sealed class Envelope : Geometry, 
	IXmlSerializable
Visual Basic (Declaration)
Public NotInheritable Class Envelope _
	Inherits Geometry _
	Implements IXmlSerializable

Remarks

An Envelope is a shape which has four sides which are parallel to the coordinate system used. It is often used to return a spatial extent or bounding box of other spatial items; for example of other geometries (Geometry.GetEnvelope, or layers (Layer.Extent). It is also commonly used to help define Viewpoint objects.

The location of an Envelope are defined by a minimum and maximum X and Y coordinate, set in the XMin, XMax, YMin and YMax properties. In order to be a valid shape, all of these properties must have a valid value; by default when a new Envelope is created, these properties are NaN (Not A Number) - use the overloaded constructors to quickly create a new valid Envelope as shown in the example code below. You can get information about the shape of an Envelope from the Height and Width read-only properties.

An Envelope also has Z (elevation) properties; ZMin, ZMax, and Depth; elevation information is NaN by default, and does not need to be specified in order for the Envelope to be valid.

In order to change the location of an Envelope, you might want to:

  • Change the XMin, XMax, YMin, and/or YMax, read-write properties.
  • Create a new Envelope using the overloaded constructors.
  • Use the GeometryOperations class to perform a spatial operation returning an Envelope, for example the Union(Envelope, Envelope) methods.

Examples

The code below demonstrates using an Envelope to define a default Viewpoint for a new Note. The Envelope is simply constructed by specifying minimum and maximum coordinates around the Point geometry of the Note, and all the geometries use the default WGS 1984 CoordinateSystem. The Note is then added to the current Map. The code assumes that you have using/Imports statements for the ESRI.ArcGISExplorer.Geometry and ESRI.ArcGISExplorer.Mapping namespaces.
CopyC#
MapDisplay disp = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay;
Note mckinley = new Note("Mount Mckinley / Denali", new ESRI.ArcGISExplorer.Geometry.Point(-151.007222, 63.069444), Symbol.Marker.Recreation.Mountain);
Envelope env = new Envelope(-151.5, 62.5, -150.5, 63.5);
mckinley.Viewpoint = new Viewpoint(env);
disp.Map.ChildItems.Add(mckinley);
CopyVB.NET
Dim disp As MapDisplay = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay
Dim mcKinley As Note = New Note("Mount McKinley / Denali", New ESRI.ArcGISExplorer.Geometry.Point(-151.007222, 63.069444), Symbol.Marker.Recreation.Mountain)
Dim env As Envelope = New Envelope(-151.5, 62.5, -150.5, 63.5)
mcKinley.Viewpoint = New Viewpoint(env)
disp.Map.ChildItems.Add(mcKinley)

Inheritance Hierarchy

System..::.Object

  ESRI.ArcGISExplorer.Geometry..::.Geometry

    ESRI.ArcGISExplorer.Geometry..::.Envelope

See Also