AGSMutablePolygon Class Reference


Description

A mutable version of AGSPolygon.

Defined in:
AGSPolygon.h ( ArcGIS library)
Since:
1.0
Inheritance diagram for AGSMutablePolygon:
AGSPolygon AGSGeometry <AGSCoding>

List of all members.

Public Member Functions

(void) - addPoint:toRing:
(void) - addPointToRing:
(void) - addRingToPolygon
(BOOL) - containsPoint:
(void) - decodeWithJSON:
(NSDictionary *) - encodeToJSON
(id) - initWithJSON:
(id) - initWithJSON:spatialReference:
(id) - initWithSpatialReference:
(void) - insertPoint:onRing:atIndex:
(BOOL) - intersectsWithEnvelope:
(NSUInteger) - numPointsInRing:
(AGSPoint *) - pointOnRing:atIndex:
(void) - removePointOnRing:atIndex:
(void) - removeRingAtIndex:
(void) - updatePoint:onRing:atIndex:

Static Public Member Functions

(id) + polygonWithJSON:

Properties

CGRect bbox
AGSEnvelopeenvelope
NSUInteger numRings
CGPathRef path
AGSSpatialReferencespatialReference

Member Function Documentation

- (void) addPoint: (AGSPoint *)  point
toRing: (NSUInteger)  ring 

Add point at end of specified ring.

Parameters:
point The point to be added.
ring The index of the ring to add point to.
Since:
1.0
- (void) addPointToRing: (AGSPoint *)  point  

Add point to end of current ring.

Parameters:
point The point to be added.
Since:
1.0
- (void) addRingToPolygon  

Create new ring and add it to the polygon.

Since:
1.0
- (BOOL) containsPoint: (AGSPoint *)  point  

Checks whether point is contained in the polygon. The point and the polygon must have the same spatial reference.

Parameters:
point The point to test containment.
Returns:
YES if point is contained within the polygon.
Since:
1.0
- (void) decodeWithJSON: (NSDictionary *)  json   [optional, inherited]

Decode object from JSON representation.

Parameters:
json The JSON representation of the object to be decoded.
Since:
1.0
- (NSDictionary *) encodeToJSON   [optional, inherited]

Encode and return JSON representation for object.

Returns:
JSON representation of object.
Since:
1.0
- (id) initWithJSON: (NSDictionary *)  json   [optional, inherited]

Initialize and return object from JSON representation.

Parameters:
json The JSON representation of the object to be created.
Returns:
Object decoded from JSON representation.
Since:
1.0
- (id) initWithJSON: (NSDictionary *)  json
spatialReference: (AGSSpatialReference *)  sr 

Initialize geometry object with json and a spatial reference.

Parameters:
json The JSON to initialize an AGSGeometry with.
sr The 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:
spatialReference The spatial referenc of geometry.
Returns:
A new geometry object.
Since:
1.0
- (void) insertPoint: (AGSPoint *)  point
onRing: (NSUInteger)  ring
atIndex: (NSUInteger)  index 

Insert point into ring at specific index.

Parameters:
point The point to be added.
ring The index of the ring to add point to.
index The index to add point at.
Since:
1.0
- (BOOL) intersectsWithEnvelope: (AGSEnvelope *)  envelope  

Returns true if envelope intersects this geometry.

Parameters:
envelope The envelope to test intersection relation.
Returns:
True if envelopes intersects.
Since:
1.0

Implemented in AGSEnvelope.

- (NSUInteger) numPointsInRing: (NSUInteger)  ring  

Get number of points in the specified ring.

Parameters:
ring The index of desired ring in the polygon.
Returns:
Number of points in ring.
Since:
1.0
- (AGSPoint *) pointOnRing: (NSUInteger)  ring
atIndex: (NSUInteger)  index 

Get point from ring.

Parameters:
ring The index of desired ring.
index The index of the desired point.
Returns:
Point in ring at index.
Since:
1.0
+ (id) polygonWithJSON: (NSDictionary *)  json  

Initialize a new autoreleased polygon geometry.

Parameters:
json The JSON representation for polygon. See REST API documentation for JSON syntax.
Returns:
A new, autoreleased, polygon geometry object.
Since:
1.0
- (void) removePointOnRing: (NSUInteger)  ring
atIndex: (NSUInteger)  index 

Remove point from specified ring.

Parameters:
ring The index of the ring to remove point from.
index The index of the point to remove.
Since:
1.0
- (void) removeRingAtIndex: (NSUInteger)  index  

Remove ring from polygon.

Parameters:
index The index of the ring to be removed.
Since:
1.0
- (void) updatePoint: (AGSPoint *)  point
onRing: (NSUInteger)  ring
atIndex: (NSUInteger)  index 

Update point on specified ring at index with point.

Parameters:
point The point to replace value at current index.
ring The index of the ring to update point at.
index The index of the point to update.
Since:
1.0

Property Documentation

- (CGRect) bbox [read, assign, inherited]

Bounding box of polygon.

Since:
1.0
- (AGSEnvelope*) envelope [read, retain, inherited]

Smallest, rectangular bounding-box that covers the geometry.

Since:
1.0
- (NSUInteger) numRings [read, assign, inherited]

Number of rings in polygon.

Since:
1.0
- (CGPathRef) path [read, assign, inherited]

CGPath representation of polygon.

Since:
1.0
- (AGSSpatialReference*) spatialReference [read, write, retain]

Geometry's spatial reference.

Since:
1.0

Implements AGSGeometry.