ArcGIS Runtime SDK for iOS: AGSPointCollection Class Reference
ArcGIS Runtime SDK for iOS  100.15
All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
AGSPointCollection Class Reference

Description

Represents vertices (immutable collection of points) of a single part of a multipart geometry (AGSMultipart).

Instances of this class represent the vertices of a single part 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. Each part is composed of a sequence of points. All points must have the same spatial reference.

Since
100
See also
AGSMultipart for multipart geometries
AGSPartCollection for parts of a multipart geometry
Inheritance diagram for AGSPointCollection:
AGSObject

Instance Methods

(NSArray< AGSPoint * > *) - array
 
(void) - enumerateXYCoordinatesUsingBlock:
 
(NSInteger) - indexOfPoint:
 
(AGSPoint *) - objectAtIndexedSubscript:
 
(AGSPoint *) - pointAtIndex:
 
(AGSEnumerator *) - pointEnumerator
 

Properties

NSInteger count
 
BOOL empty
 
AGSSpatialReferencespatialReference
 

Method Documentation

◆ array

- (NSArray<AGSPoint*>*) array

Returns an array of points.

Since
100

◆ enumerateXYCoordinatesUsingBlock:

- (void) enumerateXYCoordinatesUsingBlock: (void(^)(NSUInteger index, double x, double y))  block

Allows you to enumerate the X and Y coordinates of this point collection with a block. This is faster than other ways of enumerating the part that give out AGSPoint instances.

Since
100.5

◆ indexOfPoint:

- (NSInteger) indexOfPoint: (AGSPoint *)  point

Returns the index of the specified point.

Parameters
pointThe point whose index needs to be located.
Returns
An index of specified point
Since
100

◆ objectAtIndexedSubscript:

- (AGSPoint*) objectAtIndexedSubscript: (NSInteger)  idx

Returns the vertex at the specified index. Supports accessing an individual vertex using array-style subscript expressions.

AGSPolygon* polygon = ... ; //polygon with 2 parts (rings)
AGSPartCollection* parts = polygon.parts;
AGSPointCollection* part = [parts partAtIndex:0]; //The 0th part
AGSPoint* vertex = part[0]; //The 0th vertex in the part
AGSPartCollection * parts
Definition: AGSMultipart.h:75
Parts of a multipart geometry (AGSMultipart).
Definition: AGSPartCollection.h:58
Represents vertices (immutable collection of points) of a single part of a multipart geometry (AGSMul...
Definition: AGSPointCollection.h:41
A location defined by x and y (and optionally z) coordinates.
Definition: AGSPoint.h:73
A multipart shape used to represent an area.
Definition: AGSPolygon.h:78
Parameters
idxAn index within the bounds of the collection.
Returns
The vertex located at the index
Since
100

◆ pointAtIndex:

- (AGSPoint*) pointAtIndex: (NSInteger)  index

Returns the vertex at the specified index.

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

◆ pointEnumerator

- (AGSEnumerator*) pointEnumerator

Returns an enumerator object that lets you access each object in the point collection.

Since
100

Property Documentation

◆ count

- (NSInteger) count
readnonatomicassign

The number of points in this collection.

Since
100

◆ empty

- (BOOL) empty
readnonatomicassign

Determinse whether the collection is empty or not.

Since
100

◆ spatialReference

- (AGSSpatialReference*) spatialReference
readnonatomicstrong

The spatial reference associated with the collection. It specifies the coordinate system for the geometry's x, y, and z coordinate values.

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