|
ArcGIS Runtime SDK for iOS
100.15
|
A segment represents an edge of a multipart geometry, connecting a start to an end point.
A segment describes a continuous line between a start location and an end location. The ArcGIS Platform, including ArcGIS Runtime, supports both linear segments (represented by AGSLineSegment) and curve segments (represented by AGSCubicBezierSegment and AGSEllipticArcSegment).
densifyGeometry:maxSegmentLength: (AGSGeometryEngine) can translate curved segments into multiple AGSLineSegment instances to approximate the curve.
Every part in an AGSMultipart geometry is a collection of AGSSegment instances, where the end of one segment is at exactly the same location as the start of the following segment. AGSMultipart geometries can be composed from and decomposed into their constituent segments if required.
Because a single location is shared by adjacent segments, a single AGSPoint object is used to represent the shared location when you iterate through the points in a part. As a result, when iterating through the points in a part of a polyline or polygon, there will be one more point than the number of segments in that same part.
Segments are immutable, so you cannot change a segment's shape once it is created. For workflows that involve geometry editing, create a new segment with the properties you require.
From v100.12, curve segments are supported in geometry editing workflows. You can add curve segments to an AGSMultipartBuilder, and if a geometry has curves (AGSGeometry::hasCurves is YES) then curve segments will be returned where applicable from the AGSPart collections that comprise the multipart geometry. Curve and linear segments can be mixed together in the same geometry.
Instance Methods | |
| (BOOL) | - isEqualToSegment: |
Properties | |
| BOOL | closed |
| BOOL | curve |
| AGSPoint * | endPoint |
| AGSSpatialReference * | spatialReference |
| AGSPoint * | startPoint |
| - (BOOL) isEqualToSegment: | (AGSSegment *) | other |
Determines whether or not two time segments are equal.
| other | The segment to compare the current segment with. |
|
readnonatomicassign |
Determines whether the segment is closed or not.
|
readnonatomicassign |
NO if the object is an AGSLineSegment, YES otherwise.
Prior to v100.12, only AGSLineSegment instances were supported when creating new geometries using an AGSMultipartBuilder or iterating the AGSSegment instances in an existing AGSMultipart geometry.
From v100.12, you can add curve segments (AGSCubicBezierSegment, AGSEllipticArcSegment) when using an AGSMultipartBuilder, and get them back from an existing AGSMultipart geometry when AGSGeometry::hasCurves is YES.
AGSGeometryBuilder::hasCurves, AGSMutablePart::hasCurves, AGSCubicBezierSegment, AGSEllipticArcSegment
|
readnonatomicstrong |
The end point of the segment.
|
readnonatomicstrong |
The spatial reference of the segment.
|
readnonatomicstrong |
The start point of the segment.