A rectangle defining the extent of another geometry by its locations and size,
with sides parallel to the coordinate system.
Object Model
Syntax
Visual Basic (Declaration) | |
---|
Public NotInheritable Class Envelope
Implements IBorgGeometry, IBoundable, IGeometry |
Example
An example of accessing the envelope of a Polygon.
This example reads a record from a polygon feature layer and gets the envelope of
the polygon.
C# | Copy Code |
---|
// creates a queryfilter to select all polygons which contain the specified coordinate m_queryFilter = new QueryFilter(new ESRI.ArcGIS.Mobile.Geometries.Point(coordinate), GeometricRelationshipType.Within, null, true); // m_featurelayer is a polygon feature layer, queries the polgyon feature layer using(FeatureDataReader fdr = m_featureLayer.GetDataReader(m_queryFilter)) { // gets the first selected record if(fdr.Read()) { Polygon polygon = fdr.GetGeometry() as Polygon; Envelope envelope = polygon.GetExtent(); Debug.WriteLine(envelope.ToString()); Debug.WriteLine("MinX = " + envelope.MinX.ToString()); Debug.WriteLine("MaxX = " + envelope.MaxX.ToString()); Debug.WriteLine("MinY = " + envelope.MinY.ToString()); Debug.WriteLine("MaxY = " + envelope.MaxY.ToString()); Debug.WriteLine("XCenter = " + envelope.XCenter.ToString()); Debug.WriteLine("YCenter = " + envelope.YCenter.ToString()); Debug.WriteLine("Width = " + envelope.Width.ToString()); Debug.WriteLine("Height = " + envelope.Height.ToString()); //moves the envelope envelope.Offset(10.0, 10.0); Debug.WriteLine(envelope.ToString()); } } |
Remarks
Inheritance Hierarchy
System.Object
ESRI.ArcGIS.Mobile.Geometries.Envelope
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also