ArcGIS Runtime SDK for iOS: AGSMutablePart.h Source File
ArcGIS Runtime SDK for iOS  100.9
AGSMutablePart.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 1995-2020 ESRI
3 
4  TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
5  Unpublished material - all rights reserved under the
6  Copyright Laws of the United States and applicable international
7  laws, treaties, and conventions.
8 
9  For additional information, contact:
10  Environmental Systems Research Institute, Inc.
11  Attn: Contracts and Legal Services Department
12  380 New York Street
13  Redlands, California, 92373
14  USA
15 
16  email: contracts@esri.com
17  */
18 
19 #import <ArcGIS/AGSObject.h>
20 
21 @class AGSPoint;
22 @class AGSSpatialReference;
23 @class AGSSegment;
24 @class AGSPointCollection;
25 @class AGSEnumerator;
26  //Required for Globals API doc
28 
56 @interface AGSMutablePart : AGSObject <NSFastEnumeration>
57 
58 
59 #pragma mark -
60 #pragma mark initializers
61 
62 
63 
71 -(instancetype)initWithSpatialReference:(nullable AGSSpatialReference*)spatialReference;
72 
79 +(instancetype)partWithSpatialReference:(nullable AGSSpatialReference*)spatialReference;
80 
81 
86 -(instancetype)initWithPoints:(NSArray<AGSPoint*>*)points;
87 
92 +(instancetype)partWithPoints:(NSArray<AGSPoint*>*)points;
93 
94 #pragma mark -
95 #pragma mark properties
96 
100 @property (nonatomic, assign, readonly, getter=isEmpty) BOOL empty;
101 
106 @property (nonatomic, assign, readonly) NSInteger pointCount;
107 
111 @property (nonatomic, assign, readonly) NSInteger segmentCount;
112 
120 @property (nullable, nonatomic, strong, readonly) AGSSpatialReference *spatialReference;
121 
125 @property (nullable, nonatomic, copy, readonly) AGSPoint *startPoint;
126 
130 @property (nullable, nonatomic, copy, readonly) AGSPoint *endPoint;
131 
135 @property (nonatomic, copy, readonly) AGSPointCollection *points;
136 
137 #pragma mark -
138 #pragma mark methods
139 
145 -(NSInteger)addPoint:(AGSPoint*)point;
146 
153 -(NSInteger)addPointWithX:(double)x y:(double)y;
154 
162 -(NSInteger)addPointWithX:(double)x y:(double)y z:(double)z;
163 
168 -(void)addPoints:(NSArray<AGSPoint*>*)points;
169 
175 -(NSInteger)addSegment:(AGSSegment*)segment;
176 
182 -(void)insertPoint:(AGSPoint*)point atIndex:(NSInteger)index;
183 
190 -(void)insertPointWithX:(double)x y:(double)y atIndex:(NSInteger)index;
191 
199 -(void)insertPointWithX:(double)x y:(double)y z:(double)z atIndex:(NSInteger)index;
200 
206 -(void)insertSegment:(AGSSegment*)segment atIndex:(NSInteger)index;
207 
212 -(void)removePointAtIndex:(NSInteger)index;
213 
218 -(void)removeSegmentAtIndex:(NSInteger)index;
219 
223 -(void)removeAllSegments;
224 
230 -(void)setPoint:(AGSPoint*)point atIndex:(NSInteger)index;
231 
238 -(void)setPointWithX:(double)x y:(double)y atIndex:(NSInteger)index;
239 
245 -(void)setSegment:(AGSSegment*)segment atIndex:(NSInteger)index;
246 
252 -(AGSPoint*)pointAtIndex:(NSInteger)index;
253 
259 -(AGSSegment*)segmentAtIndex:(NSInteger)index;
260 
266 -(NSInteger)segmentIndexForStartPointIndex:(NSInteger)pointIndex;
267 
273 -(NSInteger)segmentIndexForEndPointIndex:(NSInteger)pointIndex;
274 
280 -(NSInteger)startPointIndexForSegmentIndex:(NSInteger)segmentIndex;
281 
287 -(NSInteger)endPointIndexForSegmentIndex:(NSInteger)segmentIndex;
288 
289 //I don't know what this is for or what it does
290 -(void)segmentIndexForPointIndex:(NSInteger)pointIndex outSegmentStartPointIndex:(NSInteger*)outSegmentStartPointIndex outSegmentEndPointIndex:(NSInteger*)outSegmentEndPointIndex;
291 
306 -(AGSSegment*)objectAtIndexedSubscript:(NSInteger)idx;
307 
323 -(void)setObject:(AGSSegment*)obj atIndexedSubscript:(NSInteger)idx;
324 
329 -(AGSEnumerator*)pointEnumerator;
330 
335 -(AGSEnumerator*)segmentEnumerator;
336 
341 -(NSArray<AGSSegment*>*)array;
342 
343 
344 @end
NSInteger pointCount
Definition: AGSMutablePart.h:106
AGSPoint * startPoint
Definition: AGSMutablePart.h:125
Represents vertices (immutable collection of points) of a single part of a multipart geometry (AGSMul...
Definition: AGSPointCollection.h:34
AGSEnumerator * pointEnumerator()
AGSPoint * endPoint
Definition: AGSMutablePart.h:130
Represents the spatial reference of a geometry.
Definition: AGSSpatialReference.h:39
A segment represents an edge of a multipart geometry, connecting a start to an end point...
Definition: AGSSegment.h:44
NSInteger segmentCount
Definition: AGSMutablePart.h:111
void removeAllSegments()
BOOL empty
Definition: AGSMutablePart.h:100
A mutable part of a multipart geometry.
Definition: AGSMutablePart.h:56
Definition: AGSObject.h:21
AGSEnumerator * segmentEnumerator()
A location defined by x and y (and optionally z) coordinates.
Definition: AGSPoint.h:57
NSArray< AGSSegment * > * array()