ArcGIS Runtime SDK for iOS
100.15
|
Represents a single part of a multipart geometry (AGSPolygon
or AGSPolyline
).
A collection of AGSSegment
objects that together represent a part in an AGSMultipart
geometry. You can also access the AGSPoint
objects that represent the vertices of the geometry (that is, the ends of each segment), using point-based helpers such as AGSPart::pointWithPointIndex:
.
Prior to v100.12, the only supported segment type was AGSLineSegment
. If the underlying geometry contained curve segments (AGSGeometry::hasCurves
is YES
) then the curve information was lost when iterating through the segments in that part.
From v100.12, curve segments may be returned from AGSPart::segmentWithSegmentIndex:
. A part may contain a mix of linear and curve segments.
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 segments using the subscript syntax. For example -
Instance Methods | |
(NSArray< AGSSegment * > *) | - array |
(NSInteger) | - endPointIndexForSegmentIndex: |
(AGSSegment *) | - objectAtIndexedSubscript: |
(AGSPoint *) | - pointAtIndex: |
(AGSEnumerator *) | - pointEnumerator |
(AGSSegment *) | - segmentAtIndex: |
(AGSEnumerator *) | - segmentEnumerator |
(NSInteger) | - segmentIndexForEndPointIndex: |
(void) | - segmentIndexForPointIndex:outSegmentStartPointIndex:outSegmentEndPointIndex: |
(NSInteger) | - segmentIndexForStartPointIndex: |
(NSInteger) | - startPointIndexForSegmentIndex: |
Properties | |
BOOL | empty |
AGSPoint * | endPoint |
BOOL | hasCurves |
NSInteger | pointCount |
AGSPointCollection * | points |
NSInteger | segmentCount |
AGSSpatialReference * | spatialReference |
AGSPoint * | startPoint |
- (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. |
0
is the first position. - (AGSSegment*) objectAtIndexedSubscript: | (NSInteger) | idx |
Returns the segment at the specified index. Supports accessing an individual segment using array-style subscript expressions.
For example -
idx | subscript index. |
- (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 vertex in the part.
- (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 part.
- (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. |
0
is the first position. - (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. |
0
is the first position. - (NSInteger) startPointIndexForSegmentIndex: | (NSInteger) | segmentIndex |
Position of staring vertex for the specified segment.
segmentIndex | representing the position of the segment whose starting vertex is desired. |
0
is the first position.
|
readnonatomicassign |
Indicates whether the part contains any segments.
|
readnonatomicstrong |
Ending vertex of the last segment in the part.
|
readnonatomicassign |
Indicates whether this geometry has curves.
Prior to v100.12, if this property was YES
, there was no way to access the curve segment information contained by the part. Retrieving the AGSSegment
instances of the part would return only AGSLineSegment
instances.
From v100.12, when this property is YES
, curve segments may be returned from AGSPart::segmentWithSegmentIndex:
. A part may contain a mix of linear and curve segments.
AGSGeometry::hasCurves
|
readnonatomicassign |
Number of vertices in the part. Each segment contains 2
vertices (start and end). Connected segments can share a vertex.
|
readnonatomicstrong |
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.
|
readnonatomicstrong |
Starting vertex of the first segment in the part.