ArcGIS Runtime SDK for iOS: AGSMutablePart.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSMutablePart.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 AGSSpatialReference;
30 @class AGSSegment;
31 @class AGSPointCollection;
32 @class AGSEnumerator;
33  //Required for Globals API doc
35 
67 @interface AGSMutablePart : AGSObject <NSFastEnumeration>
68 
69 
70 #pragma mark -
71 #pragma mark initializers
72 
73 
74 
81 -(instancetype)initWithSpatialReference:(nullable AGSSpatialReference*)spatialReference;
82 
89 +(instancetype)partWithSpatialReference:(nullable AGSSpatialReference*)spatialReference;
90 
95 -(instancetype)initWithPoints:(NSArray<AGSPoint*>*)points;
96 
101 +(instancetype)partWithPoints:(NSArray<AGSPoint*>*)points;
102 
103 #pragma mark -
104 #pragma mark properties
105 
109 @property (nonatomic, assign, readonly, getter=isEmpty) BOOL empty;
110 
115 @property (nonatomic, assign, readonly) NSInteger pointCount;
116 
120 @property (nonatomic, assign, readonly) NSInteger segmentCount;
121 
129 @property (nullable, nonatomic, strong, readonly) AGSSpatialReference *spatialReference;
130 
134 @property (nullable, nonatomic, copy, readonly) AGSPoint *startPoint;
135 
139 @property (nullable, nonatomic, copy, readonly) AGSPoint *endPoint;
140 
144 @property (nonatomic, copy, readonly) AGSPointCollection *points;
145 
156 @property (nonatomic, assign, readonly) BOOL hasCurves;
157 
158 #pragma mark -
159 #pragma mark methods
160 
166 -(NSInteger)addPoint:(AGSPoint*)point;
167 
174 -(NSInteger)addPointWithX:(double)x y:(double)y;
175 
183 -(NSInteger)addPointWithX:(double)x y:(double)y z:(double)z;
184 
189 -(void)addPoints:(NSArray<AGSPoint*>*)points;
190 
196 -(NSInteger)addSegment:(AGSSegment*)segment;
197 
203 -(void)insertPoint:(AGSPoint*)point atIndex:(NSInteger)index;
204 
211 -(void)insertPointWithX:(double)x y:(double)y atIndex:(NSInteger)index;
212 
220 -(void)insertPointWithX:(double)x y:(double)y z:(double)z atIndex:(NSInteger)index;
221 
227 -(void)insertSegment:(AGSSegment*)segment atIndex:(NSInteger)index;
228 
233 -(void)removePointAtIndex:(NSInteger)index;
234 
239 -(void)removeSegmentAtIndex:(NSInteger)index;
240 
244 -(void)removeAllSegments;
245 
262 -(void)setPoint:(AGSPoint*)point atIndex:(NSInteger)index;
263 
270 -(void)setPointWithX:(double)x y:(double)y atIndex:(NSInteger)index;
271 
277 -(void)setSegment:(AGSSegment*)segment atIndex:(NSInteger)index;
278 
284 -(AGSPoint*)pointAtIndex:(NSInteger)index;
285 
291 -(AGSSegment*)segmentAtIndex:(NSInteger)index;
292 
298 -(NSInteger)segmentIndexForStartPointIndex:(NSInteger)pointIndex;
299 
305 -(NSInteger)segmentIndexForEndPointIndex:(NSInteger)pointIndex;
306 
312 -(NSInteger)startPointIndexForSegmentIndex:(NSInteger)segmentIndex;
313 
319 -(NSInteger)endPointIndexForSegmentIndex:(NSInteger)segmentIndex;
320 
329 -(void)segmentIndexForPointIndex:(NSInteger)pointIndex outSegmentStartPointIndex:(NSInteger*)outSegmentStartPointIndex outSegmentEndPointIndex:(NSInteger*)outSegmentEndPointIndex;
330 
345 -(AGSSegment*)objectAtIndexedSubscript:(NSInteger)idx;
346 
362 -(void)setObject:(AGSSegment*)obj atIndexedSubscript:(NSInteger)idx;
363 
368 -(AGSEnumerator*)pointEnumerator;
369 
374 -(AGSEnumerator*)segmentEnumerator;
375 
380 -(NSArray<AGSSegment*>*)array;
381 
382 
383 @end
A mutable part of a multipart geometry.
Definition: AGSMutablePart.h:67
AGSPoint * startPoint
Definition: AGSMutablePart.h:134
void removeAllSegments()
AGSEnumerator * pointEnumerator()
NSInteger segmentCount
Definition: AGSMutablePart.h:120
AGSEnumerator * segmentEnumerator()
NSArray< AGSSegment * > * array()
BOOL hasCurves
Definition: AGSMutablePart.h:156
BOOL empty
Definition: AGSMutablePart.h:109
NSInteger pointCount
Definition: AGSMutablePart.h:115
AGSPointCollection * points
Definition: AGSMutablePart.h:144
AGSPoint * endPoint
Definition: AGSMutablePart.h:139
AGSSpatialReference * spatialReference
Definition: AGSMutablePart.h:129
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:61
Represents the spatial reference of a geometry.
Definition: AGSSpatialReference.h:49