ArcGIS Runtime SDK for iOS: AGSSegment Class Reference
ArcGIS Runtime SDK for iOS  100.12
AGSSegment Class Reference

Description

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.

Since
100
See also
AGSCubicBezierSegment, AGSEllipticArcSegment, AGSLineSegment
Inheritance diagram for AGSSegment:
AGSObject AGSCubicBezierSegment AGSEllipticArcSegment AGSLineSegment

Instance Methods

(BOOL) - isEqualToSegment:
 

Properties

BOOL closed
 
BOOL curve
 
AGSPointendPoint
 
AGSSpatialReferencespatialReference
 
AGSPointstartPoint
 

Method Documentation

◆ isEqualToSegment:

- (BOOL) isEqualToSegment: (AGSSegment *)  other

Determines whether or not two time segments are equal.

Parameters
otherThe segment to compare the current segment with.
Since
100

Property Documentation

◆ closed

- (BOOL) closed
readnonatomicassign

Determines whether the segment is closed or not.

Since
100

◆ curve

- (BOOL) curve
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.

See also
AGSGeometryBuilder::hasCurves, AGSMutablePart::hasCurves, AGSCubicBezierSegment, AGSEllipticArcSegment
Since
100.12

◆ endPoint

- (AGSPoint*) endPoint
readnonatomicstrong

The end point of the segment.

Since
100

◆ spatialReference

- (AGSSpatialReference*) spatialReference
readnonatomicstrong

The spatial reference of the segment.

Since
100

◆ startPoint

- (AGSPoint*) startPoint
readnonatomicstrong

The start point of the segment.

Since
100