10.2.5: AGSEnvelope Class Reference
10.2.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
AGSEnvelope Class Reference

Description

Instances of this class represent an envelope. An envelope is defined by a pair of X-Y coordinates representing the lower-left and upper-right corners of a rectangular bounding-box.

AGSEnvelope represents an immutable envelope, it cannot be altered after being created. Use AGSMutableEnvelope for a mutable envelope. You can get a mutable version from an AGSEnvelope by passing the mutableCopy message to an instance of AGSEnvelope.

Defined in:
AGSEnvelope.h ( ArcGIS library)

Since
1.0
See also
AGSMutableEnvelope for a mutable version.
Inheritance diagram for AGSEnvelope:
AGSGeometry <AGSCoding> AGSMutableEnvelope

Instance Methods

(BOOL) - containsEnvelope:
 
(BOOL) - containsPoint:
 
(void) - decodeWithJSON:
 
(NSDictionary *) - encodeToJSON
 
(id) - initWithJSON:
 
(id) - initWithJSON:spatialReference:
 
(id) - initWithSpatialReference:
 
(id) - initWithXmin:ymin:xmax:ymax:spatialReference:
 
(AGSEnvelope *) - intersectionWithEnvelope:
 
(BOOL) - intersectsWithEnvelope:
 
(BOOL) - isEmpty
 
(BOOL) - isEqualToEnvelope:
 
(BOOL) - isValid
 
(NSString *) - simpleRepresentation
 

Class Methods

(id) + envelopeWithXmin:ymin:xmax:ymax:spatialReference:
 

Properties

AGSPointcenter
 
AGSEnvelopeenvelope
 
double height
 
AGSSpatialReferencespatialReference
 
double width
 
double xmax
 
double xmin
 
double ymax
 
double ymin
 

Method Documentation

- (BOOL) containsEnvelope: (AGSEnvelope *)  env

Returns true if envelope fully contains the argument env. Both envelopes must have the same spatial reference.

Parameters
envThe envelope to test containment.
Returns
true if envelope is contained.
Since
1.0
- (BOOL) containsPoint: (AGSPoint *)  point

Returns true if argument point is contained within or intersects the envelope. The point and the envelope must have the same spatial reference.

Parameters
pointThe point to test containment.
Returns
true if point is contained within envelope.
Since
1.0
- (void) decodeWithJSON: (NSDictionary *)  json
optionalinherited

Decode object from JSON representation.

Parameters
jsonThe JSON representation of the object to be decoded.
Since
1.0
- (NSDictionary *) encodeToJSON
optionalinherited

Encode and return JSON representation for object.

Returns
JSON representation of object.
Since
1.0
+ (id) envelopeWithXmin: (double)  xmin
ymin: (double)  ymin
xmax: (double)  xmax
ymax: (double)  ymax
spatialReference: (AGSSpatialReference *)  spatialReference 

Initialize an autoreleased envelope object.

Parameters
xminThe bottom-left x-coordinate in map units.
yminThe bottom-left y-coordinate in map units.
xmaxThe top-right x-coordinate in map units.
ymaxThe top-right y-coordinate in map units.
spatialReferenceThe spatial reference of envelope.
Returns
A new, autoreleased, envelope object.
Since
1.0
See also
- initWithXmin:ymin:xmax:ymax:spatialReference:
- (id) initWithJSON: (NSDictionary *)  json
optionalinherited

Initialize and return object from JSON representation.

Parameters
jsonThe JSON representation of the object to be created.
Returns
Object decoded from JSON representation.
Since
1.0

Reimplemented in AGSWebMapFeatureCollection.

- (id) initWithJSON: (NSDictionary *)  json
spatialReference: (AGSSpatialReference *)  sr 

Initialize geometry object with json and a spatial reference.

Parameters
jsonThe JSON to initialize an AGSGeometry with.
srThe spatial reference of geometry represented in json.
Returns
A new geometry object.
Since
1.0
- (id) initWithSpatialReference: (AGSSpatialReference *)  spatialReference

Initialize geometry object with spatial reference.

Parameters
spatialReferenceThe spatial referenc of geometry.
Returns
A new geometry object.
Since
1.0
- (id) initWithXmin: (double)  xmin
ymin: (double)  ymin
xmax: (double)  xmax
ymax: (double)  ymax
spatialReference: (AGSSpatialReference *)  spatialReference 

Initialize a new envelope object.

Parameters
xminThe bottom-left x-coordinate in map units.
yminThe bottom-left y-coordinate in map units.
xmaxThe top-right x-coordinate in map units.
ymaxThe top-right y-coordinate in map units.
spatialReferenceThe spatial reference of envelope.
Returns
A new envelope object.
Since
1.0
- (AGSEnvelope *) intersectionWithEnvelope: (AGSEnvelope *)  envelope

Returns the intersection between this envelope and the argument envelope. Both envelopes must have the same spatial reference.

Parameters
envelopeThe envelope to test intersection relation.
Returns
Intersecting envelope else nil.
Since
1.0
- (BOOL) intersectsWithEnvelope: (AGSEnvelope *)  envelope

Returns true if argument envelope intersects this envelope. Both envelopes must have the same spatial reference.

Parameters
envelopeThe envelope to test intersection relation.
Returns
true if envelopes intersects.
Since
1.0

Implements AGSGeometry.

- (BOOL) isEmpty

Returns true if envelope width and height are 0.

Since
1.0

Implements AGSGeometry.

- (BOOL) isEqualToEnvelope: (AGSEnvelope *)  other

Returns whether another envelope is equal to this envelope.

Parameters
otherThe other envelope.
Returns
Whether the other envelope is equal to this envelope.
Since
1.8
- (BOOL) isValid

Returns whether or not the geometry is valid.

Since
1.8
- (NSString *) simpleRepresentation

Simple string representation of envelope.

Returns
Simple representation.
Since
1.0

Property Documentation

- (AGSPoint*) center
readnonatomicstrong

Center point of envelope.

Since
1.0
- (AGSEnvelope*) envelope
readnonatomiccopyinherited

Smallest, rectangular bounding-box that covers the geometry.

Since
1.0
- (double) height
readnonatomicassign

Height of the envelope.

Since
1.0
- (AGSSpatialReference*) spatialReference
readnonatomicstronginherited

Geometry's spatial reference.

Since
1.0
- (double) width
readnonatomicassign

Width of the envelope.

Since
1.0
- (double) xmax
readnonatomicassign

X-coordinate of upper-right corner.

Since
1.0
- (double) xmin
readnonatomicassign

X-coordinate of lower-left corner.

Since
1.0
- (double) ymax
readnonatomicassign

Y-cooridnate of upper-right corner.

Since
1.0
- (double) ymin
readnonatomicassign

Y-coordinate of lower-left corner.

Since
1.0