ArcGIS Runtime SDK for iOS: AGSPart Class Reference
ArcGIS Runtime SDK for iOS  100.9
AGSPart Class Reference

Description

Represents a single part of a multipart geometry (AGSPolygon or AGSPolyline).

Instances of this class represent an individual part of a multipart geometry such as polygon or polyline. A part is a collection of segments that define the shape of the part. As a convenience, you can access points that represent the vertices of the part, instead of working with segments.

This class adopts NSFastEnumeration which permits the part's segments to be enumerated conveniently using a for-in loop. For example -

let part:AGSPart = ... //A part containing segments
for segment in part {
do something
}

This class also provides subscripting support. So you can access segments using the subscript syntax. For example -

let part:AGSMutablePart = ... //A part containing segments
let segment = part[0] //The segment at 0th index
Since
100
Inheritance diagram for AGSPart:
AGSObject

Instance Methods

(NSInteger) - endPointIndexForSegmentIndex:
 
(AGSPoint *) - pointAtIndex:
 
(AGSSegment *) - segmentAtIndex:
 
(NSInteger) - segmentIndexForEndPointIndex:
 
(void) - segmentIndexForPointIndex:outSegmentStartPointIndex:outSegmentEndPointIndex:
 
(NSInteger) - segmentIndexForStartPointIndex:
 
(NSInteger) - startPointIndexForSegmentIndex:
 

Properties

BOOL empty
 
AGSPointendPoint
 
BOOL hasCurves
 
NSInteger pointCount
 
AGSPointCollectionpoints
 
NSInteger segmentCount
 
AGSSpatialReferencespatialReference
 
AGSPointstartPoint
 

Method Documentation

§ endPointIndexForSegmentIndex:()

- (NSInteger) endPointIndexForSegmentIndex: (NSInteger)  segmentIndex

Position of ending vertex for the specified segment

Parameters
segmentIndexrepresenting the position of the segment whose ending vertex is desired
Returns
Position of the ending vertex. 0 is the first position
Since
100

§ pointAtIndex:()

- (AGSPoint*) pointAtIndex: (NSInteger)  index

Vertex at specified position in the part

Parameters
indexof desired position. 0 is the first position
Since
100

§ segmentAtIndex:()

- (AGSSegment*) segmentAtIndex: (NSInteger)  index

Segment at specified position in the part

Parameters
indexof desired position. 0 is the first position
Since
100

§ segmentIndexForEndPointIndex:()

- (NSInteger) segmentIndexForEndPointIndex: (NSInteger)  pointIndex

Position of segment that contains the specified vertex as its ending point

Parameters
pointIndexrepresenting the position of vertex which serves as the ending point for the segment
Returns
Position of segment. 0 is the first position
Since
100

§ segmentIndexForPointIndex:outSegmentStartPointIndex:outSegmentEndPointIndex:()

- (void) segmentIndexForPointIndex: (NSInteger)  pointIndex
outSegmentStartPointIndex: (NSInteger *)  outSegmentStartPointIndex
outSegmentEndPointIndex: (NSInteger *)  outSegmentEndPointIndex 

§ segmentIndexForStartPointIndex:()

- (NSInteger) segmentIndexForStartPointIndex: (NSInteger)  pointIndex

Position of segment that contains the specified vertex as its starting point

Parameters
pointIndexrepresenting the position of vertex which serves as the starting point for the segment
Returns
Position of segment. 0 is the first position
Since
100

§ startPointIndexForSegmentIndex:()

- (NSInteger) startPointIndexForSegmentIndex: (NSInteger)  segmentIndex

Position of staring vertex for the specified segment

Parameters
segmentIndexrepresenting the position of the segment whose starting vertex is desired
Returns
Position of the starting vertex. 0 is the first position
Since
100

Property Documentation

§ empty

- (BOOL) empty
readnonatomicassign

Indicates whether the part contains any segments

Since
100

§ endPoint

- (AGSPoint*) endPoint
readnonatomicstrong

Ending vertex of the last segment in the part

Since
100

§ hasCurves

- (BOOL) hasCurves
readnonatomicassign

Indicates whether this geometry has curves.

Since
100

§ pointCount

- (NSInteger) pointCount
readnonatomicassign

Number of vertices in the part. Each segment contains 2 vertices (start and end). Connected segments can share a vertex.

Since
100

§ points

- (AGSPointCollection*) points
readnonatomicstrong

All the vertices in this part

Since
100

§ segmentCount

- (NSInteger) segmentCount
readnonatomicassign

Number of segments in the part

Since
100

§ spatialReference

- (AGSSpatialReference*) spatialReference
readnonatomicstrong

The spatial reference associated with segments and vertices in this part. It specifies the coordinate system for each segment and vertex's x & y coordinate values. All segments and vertices that belong to this part must have the same spatial reference, or if they don't have a spatial reference, it will be assumed that they contain coordinates that match this spatial reference.

Since
100
Note
Geometries that represent geographic locations should always have a spatial reference. Otherwise the coordinates of the geometry are meaningless.

§ startPoint

- (AGSPoint*) startPoint
readnonatomicstrong

Starting vertex of the first segment in the part

Since
100