ArcGIS Runtime SDK for iOS: AGSMutablePointCollection.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSMutablePointCollection.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2022 ESRI
3 
4  All rights reserved under the copyright laws of the United States
5  and applicable international laws, treaties, and conventions.
6 
7  This material is licensed for use under the Esri Master License
8  Agreement (MLA), and is bound by the terms of that agreement.
9  You may redistribute and use this code without modification,
10  provided you adhere to the terms of the MLA and include this
11  copyright notice.
12 
13  See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
14 
15  For additional information, contact:
16  Environmental Systems Research Institute, Inc.
17  Attn: Contracts and Legal Services Department
18  380 New York Street
19  Redlands, California, 92373
20  USA
21 
22  email: contracts@esri.com
23  */
24 
25 #import <Foundation/Foundation.h>
26 #import <ArcGIS/AGSObject.h>
27 
28 @class AGSPoint;
29 @class AGSEnumerator;
30 @class AGSSpatialReference;
31  //Required for Globals API doc
33 
59 @interface AGSMutablePointCollection : AGSObject <NSFastEnumeration>
60 
61 
62 #pragma mark -
63 #pragma mark initializers
64 
65 
66 
72 -(instancetype)initWithSpatialReference:(nullable AGSSpatialReference*)spatialReference;
73 
80 +(instancetype)pointCollectionWithSpatialReference:(nullable AGSSpatialReference*)spatialReference;
81 
82 #pragma mark -
83 #pragma mark properties
84 
89 @property (nonatomic, assign, readonly) BOOL isEmpty;
90 
95 @property (nonatomic, assign, readonly) NSInteger count;
96 
103 @property (nullable, nonatomic, strong, readonly) AGSSpatialReference *spatialReference;
104 
105 #pragma mark -
106 #pragma mark methods
107 
113 -(NSInteger)addPoint:(AGSPoint*)point;
114 
121 -(NSInteger)addPointWithX:(double)x y:(double)y;
122 
130 -(NSInteger)addPointWithX:(double)x y:(double)y z:(double)z;
131 
136 -(void)addPoints:(NSArray<AGSPoint*>*)points;
137 
143 -(void)insertPoint:(AGSPoint*)point atIndex:(NSInteger)index;
144 
151 -(void)insertPointWithX:(double)x y:(double)y atIndex:(NSInteger)index;
152 
160 -(void)insertPointWithX:(double)x y:(double)y z:(double)z atIndex:(NSInteger)index;
161 
166 -(void)removePointAtIndex:(NSInteger)index;
167 
171 -(void)removeAllPoints;
172 
179 -(NSInteger)indexOfPoint:(AGSPoint*)point;
180 
187 -(AGSPoint*)pointAtIndex:(NSInteger)index;
188 
194 -(void)setPoint:(AGSPoint*)point atIndex:(NSInteger)index;
195 
209 -(AGSPoint*)objectAtIndexedSubscript:(NSInteger)idx;
210 
224 -(void)setObject:(AGSPoint*)obj atIndexedSubscript:(NSInteger)idx;
225 
230 -(AGSEnumerator*)pointEnumerator;
231 
236 -(NSArray<AGSPoint*>*)array;
237 
242 -(void)enumerateXYCoordinatesUsingBlock:(void(^)(NSUInteger index, double x, double y))block;
243 
244 
245 @end
Mutable collection of points of a multipoint geometry builder.
Definition: AGSMutablePointCollection.h:59
NSArray< AGSPoint * > * array()
BOOL isEmpty
Definition: AGSMutablePointCollection.h:89
AGSEnumerator * pointEnumerator()
AGSSpatialReference * spatialReference
Definition: AGSMutablePointCollection.h:103
NSInteger count
Definition: AGSMutablePointCollection.h:95
Definition: AGSObject.h:28
A location defined by x and y (and optionally z) coordinates.
Definition: AGSPoint.h:73
Represents the spatial reference of a geometry.
Definition: AGSSpatialReference.h:49