ArcGIS Runtime SDK for iOS: AGSMutablePart.h Source File
ArcGIS Runtime SDK for iOS  100.11
AGSMutablePart.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2021 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 AGSSpatialReference;
30 @class AGSSegment;
31 @class AGSPointCollection;
32 @class AGSEnumerator;
33  //Required for Globals API doc
35 
62 @interface AGSMutablePart : AGSObject <NSFastEnumeration>
63 
64 
65 #pragma mark -
66 #pragma mark initializers
67 
68 
69 
76 -(instancetype)initWithSpatialReference:(nullable AGSSpatialReference*)spatialReference;
77 
84 +(instancetype)partWithSpatialReference:(nullable AGSSpatialReference*)spatialReference;
85 
90 -(instancetype)initWithPoints:(NSArray<AGSPoint*>*)points;
91 
96 +(instancetype)partWithPoints:(NSArray<AGSPoint*>*)points;
97 
98 #pragma mark -
99 #pragma mark properties
100 
104 @property (nonatomic, assign, readonly, getter=isEmpty) BOOL empty;
105 
110 @property (nonatomic, assign, readonly) NSInteger pointCount;
111 
115 @property (nonatomic, assign, readonly) NSInteger segmentCount;
116 
124 @property (nullable, nonatomic, strong, readonly) AGSSpatialReference *spatialReference;
125 
129 @property (nullable, nonatomic, copy, readonly) AGSPoint *startPoint;
130 
134 @property (nullable, nonatomic, copy, readonly) AGSPoint *endPoint;
135 
139 @property (nonatomic, copy, readonly) AGSPointCollection *points;
140 
141 #pragma mark -
142 #pragma mark methods
143 
149 -(NSInteger)addPoint:(AGSPoint*)point;
150 
157 -(NSInteger)addPointWithX:(double)x y:(double)y;
158 
166 -(NSInteger)addPointWithX:(double)x y:(double)y z:(double)z;
167 
172 -(void)addPoints:(NSArray<AGSPoint*>*)points;
173 
179 -(NSInteger)addSegment:(AGSSegment*)segment;
180 
186 -(void)insertPoint:(AGSPoint*)point atIndex:(NSInteger)index;
187 
194 -(void)insertPointWithX:(double)x y:(double)y atIndex:(NSInteger)index;
195 
203 -(void)insertPointWithX:(double)x y:(double)y z:(double)z atIndex:(NSInteger)index;
204 
210 -(void)insertSegment:(AGSSegment*)segment atIndex:(NSInteger)index;
211 
216 -(void)removePointAtIndex:(NSInteger)index;
217 
222 -(void)removeSegmentAtIndex:(NSInteger)index;
223 
227 -(void)removeAllSegments;
228 
234 -(void)setPoint:(AGSPoint*)point atIndex:(NSInteger)index;
235 
242 -(void)setPointWithX:(double)x y:(double)y atIndex:(NSInteger)index;
243 
249 -(void)setSegment:(AGSSegment*)segment atIndex:(NSInteger)index;
250 
256 -(AGSPoint*)pointAtIndex:(NSInteger)index;
257 
263 -(AGSSegment*)segmentAtIndex:(NSInteger)index;
264 
270 -(NSInteger)segmentIndexForStartPointIndex:(NSInteger)pointIndex;
271 
277 -(NSInteger)segmentIndexForEndPointIndex:(NSInteger)pointIndex;
278 
284 -(NSInteger)startPointIndexForSegmentIndex:(NSInteger)segmentIndex;
285 
291 -(NSInteger)endPointIndexForSegmentIndex:(NSInteger)segmentIndex;
292 
293 //I don't know what this is for or what it does
294 -(void)segmentIndexForPointIndex:(NSInteger)pointIndex outSegmentStartPointIndex:(NSInteger*)outSegmentStartPointIndex outSegmentEndPointIndex:(NSInteger*)outSegmentEndPointIndex;
295 
310 -(AGSSegment*)objectAtIndexedSubscript:(NSInteger)idx;
311 
327 -(void)setObject:(AGSSegment*)obj atIndexedSubscript:(NSInteger)idx;
328 
333 -(AGSEnumerator*)pointEnumerator;
334 
339 -(AGSEnumerator*)segmentEnumerator;
340 
345 -(NSArray<AGSSegment*>*)array;
346 
347 
348 @end
A mutable part of a multipart geometry.
Definition: AGSMutablePart.h:62
AGSPoint * startPoint
Definition: AGSMutablePart.h:129
void removeAllSegments()
AGSEnumerator * pointEnumerator()
NSInteger segmentCount
Definition: AGSMutablePart.h:115
AGSEnumerator * segmentEnumerator()
NSArray< AGSSegment * > * array()
BOOL empty
Definition: AGSMutablePart.h:104
NSInteger pointCount
Definition: AGSMutablePart.h:110
AGSPointCollection * points
Definition: AGSMutablePart.h:139
AGSPoint * endPoint
Definition: AGSMutablePart.h:134
AGSSpatialReference * spatialReference
Definition: AGSMutablePart.h:124
Definition: AGSObject.h:28
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 segment represents an edge of a multipart geometry, connecting a start to an end point.
Definition: AGSSegment.h:59
Represents the spatial reference of a geometry.
Definition: AGSSpatialReference.h:46