AGSPolyline Class Reference


Description

Instances of this class represent polyline objects. A polyline is defined by a collection of paths and an optional spatial reference. A path represents a continuous line and is defined by an array of points. Each point constitutes a vertex of the polyline.

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

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

List of all members.

Public Member Functions

(void) - decodeWithJSON:
(NSDictionary *) - encodeToJSON
(id) - initWithJSON:
(id) - initWithJSON:spatialReference:
(id) - initWithSpatialReference:
(BOOL) - intersectsWithEnvelope:
(BOOL) - isEmpty
(BOOL) - isEqualToPolyline:
(BOOL) - isValid
(NSUInteger) - numPointsInPath:
(AGSPoint *) - pointOnPath:atIndex:

Static Public Member Functions

(id) + polylineWithJSON:

Properties

AGSEnvelopeenvelope
NSUInteger numPaths
CGPathRef path
AGSSpatialReferencespatialReference

Protected Attributes

struct BORGPolyline * _borg

Member Function Documentation

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

Reimplemented in AGSEnvelope.

- (BOOL) isEmpty  

Returns whether or not the geometry is empty.

Since:
1.8

Reimplemented in AGSEnvelope.

- (BOOL) isEqualToPolyline: (AGSPolyline*)  other  

Returns a value whether another polyline is equal to this polyline.

Parameters:
other The other polyline to compare to.
Returns:
Whether or not the other polyline is equal to this polyline.
Since:
1.8
- (BOOL) isValid  

Returns whether or not the geometry is valid.

Since:
1.8
- (NSUInteger) numPointsInPath: (NSUInteger)  path  

Get number of points in the specified path.

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

Get point from path at specified index.

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

Initialize a new autoreleased polyline geometry.

Parameters:
json The JSON representation for polyline. See REST API documentation for JSON syntax.
Returns:
A new, autoreleased, polyline geometry object.
Since:
1.0

Property Documentation

- (NSUInteger) numPaths [read, assign]

Number of paths in polyline.

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

Geometry's spatial reference.

Since:
1.0

Reimplemented in AGSMutableEnvelope, AGSMutableMultipoint, AGSMutablePoint, AGSMutablePolygon, and AGSMutablePolyline.