|
ArcGIS Runtime SDK for iOS
100.9
|
A mutable part of a multipart geometry.
Instances of this class represent an individual, modifiable, part of a multipart geometry such as polygon or polyline. A part is a collection of segments that define the shape of the part. As a convenience, you can work with points that represent the vertices of the part, instead of working with segments.
The part is mutable so it can be modified which is useful when constructing or modifying geometries using builders.
This class adopts NSFastEnumeration which permits the part's segments to be enumerated conveniently using a for-in loop. For example -
This class also provides subscripting support. So you can access and set segments using the subscript syntax. For example -
Class Methods | |
| (instancetype) | + partWithPoints: |
| (instancetype) | + partWithSpatialReference: |
Properties | |
| BOOL | empty |
| AGSPoint * | endPoint |
| NSInteger | pointCount |
| AGSPointCollection * | points |
| NSInteger | segmentCount |
| AGSSpatialReference * | spatialReference |
| AGSPoint * | startPoint |
| - (NSInteger) addPoint: | (AGSPoint *) | point |
Add a vertex to the the end of this part
| point | vertex to add |
| - (void) addPoints: | (NSArray< AGSPoint * > *) | points |
Add points from the provided array to the end of this part
| points | to add |
| - (NSInteger) addPointWithX: | (double) | x | |
| y: | (double) | y | |
Add a vertex to the the end of this part
| x | coordinate of the vertex |
| y | coordinate of the vertex |
| - (NSInteger) addPointWithX: | (double) | x | |
| y: | (double) | y | |
| z: | (double) | z | |
Add a vertex to the the end of this part
| x | coordinate of the vertex |
| y | coordinate of the vertex |
| z | coordinate of the vertex |
| - (NSInteger) addSegment: | (AGSSegment *) | segment |
Add a segment to the the end of this part
| segment | to add |
| - (NSArray<AGSSegment*>*) array |
Returns an array of segments.
| - (NSInteger) endPointIndexForSegmentIndex: | (NSInteger) | segmentIndex |
Position of ending vertex for the specified segment
| segmentIndex | representing the position of the segment whose ending vertex is desired |
| - (instancetype) initWithPoints: | (NSArray< AGSPoint * > *) | points |
Initialize a part with points.
| points | for the part to be constructed |
| - (instancetype) initWithSpatialReference: | (nullable AGSSpatialReference *) | spatialReference |
Initialize a part with specified spatial reference. All segments and vertices that belong to this part must have the same spatial reference, or if they don't have a spatial reference, it will be assumed that they contain coordinates that match this spatial reference.
| spatialReference | of the part |
| - (void) insertPoint: | (AGSPoint *) | point | |
| atIndex: | (NSInteger) | index | |
Insert a vertex at the specified position
| point | vertext to add |
| index | of desired position. 0 is the first position |
| - (void) insertPointWithX: | (double) | x | |
| y: | (double) | y | |
| atIndex: | (NSInteger) | index | |
Insert a vertex at the specified position
| x | coordinate of the vertex |
| y | coordinate of the vertex |
| index | of desired position. 0 is the first position |
| - (void) insertPointWithX: | (double) | x | |
| y: | (double) | y | |
| z: | (double) | z | |
| atIndex: | (NSInteger) | index | |
Insert a vertex at the specified position
| x | coordinate of the vertex |
| y | coordinate of the vertex |
| z | coordinate of the vertex |
| index | of desired position. 0 is the first position |
| - (void) insertSegment: | (AGSSegment *) | segment | |
| atIndex: | (NSInteger) | index | |
Insert a segment at the specified position
| segment | to add |
| index | of desired position. 0 is the first position |
| + (instancetype) partWithPoints: | (NSArray< AGSPoint * > *) | points |
Initialize a part with points.
| points | for the part to be constructed |
| + (instancetype) partWithSpatialReference: | (nullable AGSSpatialReference *) | spatialReference |
Initialize a part with specified spatial reference. All segments and vertices that belong to this part must have the same spatial reference, or if they don't have a spatial reference, it will be assumed that they contain coordinates that match this spatial reference.
| spatialReference | of the part |
| - (AGSPoint*) pointAtIndex: | (NSInteger) | index |
Vertex at specified position in the part
| index | of desired position. 0 is the first position |
| - (AGSEnumerator*) pointEnumerator |
Returns an enumerator object that lets you access each point in the segment collection.
| - (void) removeAllSegments |
Remove all segments (and thereby also vertices) from the part
| - (void) removePointAtIndex: | (NSInteger) | index |
Remove vertex at specified position
| index | of desired position. 0 is the first position |
| - (void) removeSegmentAtIndex: | (NSInteger) | index |
Remove segment at specified position
| index | of desired position. 0 is the first position |
| - (AGSSegment*) segmentAtIndex: | (NSInteger) | index |
Segment at specified position in the part
| index | of desired position. 0 is the first position |
| - (AGSEnumerator*) segmentEnumerator |
Returns an enumerator object that lets you access each segment in the segment collection.
| - (NSInteger) segmentIndexForEndPointIndex: | (NSInteger) | pointIndex |
Position of segment that contains the specified vertex as its ending point
| pointIndex | representing the position of vertex which serves as the ending point for the segment |
| - (void) segmentIndexForPointIndex: | (NSInteger) | pointIndex | |
| outSegmentStartPointIndex: | (NSInteger *) | outSegmentStartPointIndex | |
| outSegmentEndPointIndex: | (NSInteger *) | outSegmentEndPointIndex | |
| - (NSInteger) segmentIndexForStartPointIndex: | (NSInteger) | pointIndex |
Position of segment that contains the specified vertex as its starting point
| pointIndex | representing the position of vertex which serves as the starting point for the segment |
| - (void) setObject: | (AGSSegment *) | obj | |
| atIndexedSubscript: | (NSInteger) | idx | |
Returns the segment at the specified index. Supports accessing an individual segment using array-style subscript expressions.
For example -
| idx | subscript index |
/** Sets the segment at the specified index. Supports assigning an individual segment using array-style subscript expressions. For example -
| obj | segment to set |
| idx | subscript index |
| - (void) setPoint: | (AGSPoint *) | point | |
| atIndex: | (NSInteger) | index | |
Replace existing vertex with the specified one
| point | vertex to replace with |
| index | of vertex to replace |
| - (void) setPointWithX: | (double) | x | |
| y: | (double) | y | |
| atIndex: | (NSInteger) | index | |
Replace existing vertex at the specified position
| x | coordinate of the vertex |
| y | coordinate of the vertex |
| index | of desired position. 0 is the first position |
| - (void) setSegment: | (AGSSegment *) | segment | |
| atIndex: | (NSInteger) | index | |
Replace existing segment with the specified one
| segment | to replace with |
| index | of segment to replace |
| - (NSInteger) startPointIndexForSegmentIndex: | (NSInteger) | segmentIndex |
Position of staring vertex for the specified segment
| segmentIndex | representing the position of the segment whose starting vertex is desired |
|
readnonatomicassign |
Indicates whether the part contains any segments
|
readnonatomiccopy |
Ending vertex of the last segment in the part
|
readnonatomicassign |
Number of vertices in the part. Each segment contains 2 vertices (start and end). Connected segments can share a vertex.
|
readnonatomiccopy |
All the vertices in this part
|
readnonatomicassign |
Number of segments in the part
|
readnonatomicstrong |
The spatial reference associated with segments and vertices in this part. It specifies the coordinate system for each segment and vertex's x & y coordinate values. All segments and vertices that belong to this part must have the same spatial reference, or if they don't have a spatial reference, it will be assumed that they contain coordinates that match this spatial reference.
|
readnonatomiccopy |
Starting vertex of the first segment in the part