ArcGIS Runtime SDK for iOS: AGSPartCollection Class Reference
ArcGIS Runtime SDK for iOS  100.14
AGSPartCollection Class Reference

Description

Parts of a multipart geometry (AGSMultipart).

Instances of this class represent the parts of a multipart geometry (AGSMultipart). For example, polygons have multiple parts where each part is a ring and polylines have multiple parts where each part is a line.

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

let collection:AGSPartCollection = ... //A collection of parts
for part in collection {
//do something
}
Parts of a multipart geometry (AGSMultipart).
Definition: AGSPartCollection.h:58

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

let collection:AGSPartCollection = ... //A collection of parts
let part = collection[0] //The part at 0th index
Since
100
See also
AGSMultipart for multipart geometries
Inheritance diagram for AGSPartCollection:
AGSObject

Instance Methods

(NSArray< AGSPart * > *) - array
 
(NSInteger) - indexOfPart:
 
(AGSPart *) - objectAtIndexedSubscript:
 
(AGSPart *) - partAtIndex:
 
(AGSEnumerator *) - partEnumerator
 

Properties

NSInteger count
 
BOOL empty
 
AGSSpatialReferencespatialReference
 
NSInteger totalPointCount
 

Method Documentation

◆ array

- (NSArray<AGSPart*>*) array

An array of parts.

Since
100

◆ indexOfPart:

- (NSInteger) indexOfPart: (AGSPart *)  part

The index of the specified part.

Parameters
partThe part whose index needs to be located.
Returns
An index of specified part.
Since
100

◆ objectAtIndexedSubscript:

- (AGSPart*) objectAtIndexedSubscript: (NSInteger)  idx

The part at the specified index. Supports accessing an individual part using array-style subscript expressions.

AGSPolygon* polygon = ... ; //polygon with 2 parts (rings)
AGSPartCollection* parts = polygon.parts;
AGSPointCollection* part = parts[0]; //The 0th part
AGSPartCollection * parts
Definition: AGSMultipart.h:75
Represents vertices (immutable collection of points) of a single part of a multipart geometry (AGSMul...
Definition: AGSPointCollection.h:41
A multipart shape used to represent an area.
Definition: AGSPolygon.h:78
Parameters
idxAn index within the bounds of the collection.
Returns
The part located at the index.
Since
100

◆ partAtIndex:

- (AGSPart*) partAtIndex: (NSInteger)  index

The part at the specified index.

Parameters
indexAn index within the bounds of the collection.
Returns
The part located at the index.
Since
100

◆ partEnumerator

- (AGSEnumerator*) partEnumerator

An enumerator object that lets you access each object in the part collection.

Since
100

Property Documentation

◆ count

- (NSInteger) count
readnonatomicassign

The number of parts of the geometry.

Since
100

◆ empty

- (BOOL) empty
readnonatomicassign

Indicates whether the collection is empty or not.

Since
100

◆ spatialReference

- (AGSSpatialReference*) spatialReference
readnonatomicstrong

The spatial reference associated with parts in the collection. It specifies the coordinate system for each part's x & y coordinate values. All parts in this collection 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.

◆ totalPointCount

- (NSInteger) totalPointCount
readnonatomicassign

The total number of points (vertices) across all parts of the geometry.

Since
100