ArcGIS Runtime SDK for iOS: AGSLineSegment Class Reference
ArcGIS Runtime SDK for iOS  100.15
AGSLineSegment Class Reference

Description

A line segment.

Instances of this class represents a line segment. A line segment is a pair of start and end points.

Since
100
Inheritance diagram for AGSLineSegment:
AGSSegment AGSObject

Instance Methods

(instancetype) - initWithStartPoint:angle:length:
 
(instancetype) - initWithStartPoint:endPoint:
 
(instancetype) - initWithStartPoint:endPoint:spatialReference:
 
(instancetype) - initWithXStart:yStart:xEnd:yEnd:
 
(instancetype) - initWithXStart:yStart:xEnd:yEnd:spatialReference:
 
(instancetype) - initWithXStart:yStart:zStart:xEnd:yEnd:zEnd:
 
(instancetype) - initWithXStart:yStart:zStart:xEnd:yEnd:zEnd:spatialReference:
 
(BOOL) - isEqualToSegment:
 

Class Methods

(instancetype) + lineSegmentWithStartPoint:angle:length:
 
(instancetype) + lineSegmentWithStartPoint:endPoint:
 
(instancetype) + lineSegmentWithStartPoint:endPoint:spatialReference:
 
(instancetype) + lineSegmentWithXStart:yStart:xEnd:yEnd:
 
(instancetype) + lineSegmentWithXStart:yStart:xEnd:yEnd:spatialReference:
 
(instancetype) + lineSegmentWithXStart:yStart:zStart:xEnd:yEnd:zEnd:
 
(instancetype) + lineSegmentWithXStart:yStart:zStart:xEnd:yEnd:zEnd:spatialReference:
 

Properties

BOOL closed
 
BOOL curve
 
AGSPointendPoint
 
AGSSpatialReferencespatialReference
 
AGSPointstartPoint
 

Method Documentation

◆ initWithStartPoint:angle:length:

- (instancetype) initWithStartPoint: (AGSPoint *)  startPoint
angle: (double)  angle
length: (double)  length 

Creates a line segment with the provided start point, angle and length.

Parameters
startPointThe start coordinate along x-axis.
angleThe angle in radians.
lengthThe length in the unit of start point's spatial reference.
Since
100

◆ initWithStartPoint:endPoint:

- (instancetype) initWithStartPoint: (AGSPoint *)  startPoint
endPoint: (AGSPoint *)  endPoint 

Creates a line segment based on two points.

If both points have a spatial reference set, they must be equal.

Parameters
startPointThe start point.
endPointThe end point.
Since
100

◆ initWithStartPoint:endPoint:spatialReference:

- (instancetype) initWithStartPoint: (AGSPoint *)  startPoint
endPoint: (AGSPoint *)  endPoint
spatialReference: (nullable AGSSpatialReference *)  spatialReference 

Creates a line segment based on two points and a spatial reference.

The spatial reference parameter is used if the points have a nil spatial reference. If more than one spatial reference is supplied (as a parameter or as a property of an AGSPoint parameter), they must all be equal.

Parameters
startPointThe start point.
endPointThe end point.
spatialReferenceThe spatial reference for the line segment to be constructed.
Since
100

◆ initWithXStart:yStart:xEnd:yEnd:

- (instancetype) initWithXStart: (double)  xStart
yStart: (double)  yStart
xEnd: (double)  xEnd
yEnd: (double)  yEnd 

Creates a line segment based on coordinates.

Parameters
xStartThe start coordinate along x-axis.
yStartThe start coordinate along y-axis.
xEndThe end coordinate along x-axis.
yEndThe end coordinate along y-axis.
Since
100

◆ initWithXStart:yStart:xEnd:yEnd:spatialReference:

- (instancetype) initWithXStart: (double)  xStart
yStart: (double)  yStart
xEnd: (double)  xEnd
yEnd: (double)  yEnd
spatialReference: (nullable AGSSpatialReference *)  spatialReference 

Creates a line segment based on coordinates and spatial reference.

Parameters
xStartThe start coordinate along x-axis.
yStartThe start coordinate along y-axis.
xEndThe end coordinate along x-axis.
yEndThe end coordinate along y-axis.
spatialReferenceThe spatial reference for the line segment to be constructed.
Since
100

◆ initWithXStart:yStart:zStart:xEnd:yEnd:zEnd:

- (instancetype) initWithXStart: (double)  xStart
yStart: (double)  yStart
zStart: (double)  zStart
xEnd: (double)  xEnd
yEnd: (double)  yEnd
zEnd: (double)  zEnd 

Creates a line segment based on 3D coordinates.

Parameters
xStartThe start coordinate along x-axis.
yStartThe start coordinate along y-axis.
zStartThe start coordinate along z-axis.
xEndThe end coordinate along x-axis.
yEndThe end coordinate along y-axis.
zEndThe end coordinate along z-axis.
Since
100

◆ initWithXStart:yStart:zStart:xEnd:yEnd:zEnd:spatialReference:

- (instancetype) initWithXStart: (double)  xStart
yStart: (double)  yStart
zStart: (double)  zStart
xEnd: (double)  xEnd
yEnd: (double)  yEnd
zEnd: (double)  zEnd
spatialReference: (nullable AGSSpatialReference *)  spatialReference 

Creates a line segment based on 3D coordinates and a spatial reference.

Parameters
xStartThe start coordinate along x-axis.
yStartThe start coordinate along y-axis.
zStartThe start coordinate along z-axis.
xEndThe end coordinate along x-axis.
yEndThe end coordinate along y-axis.
zEndThe end coordinate along z-axis.
spatialReferenceThe spatial reference for the line segment to be constructed.
Since
100

◆ 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

◆ lineSegmentWithStartPoint:angle:length:

+ (instancetype) lineSegmentWithStartPoint: (AGSPoint *)  startPoint
angle: (double)  angle
length: (double)  length 

Creates a line segment with the provided start point, angle and length.

Parameters
startPointThe start coordinate along x-axis.
angleThe angle in radians.
lengthThe length in the unit of start point's spatial reference.
Returns
A new line segment.
Since
100

◆ lineSegmentWithStartPoint:endPoint:

+ (instancetype) lineSegmentWithStartPoint: (AGSPoint *)  startPoint
endPoint: (AGSPoint *)  endPoint 

Creates a line segment with the provided start and end points.

Parameters
startPointThe start point.
endPointThe end point.
Returns
A new line segment.
Since
100

◆ lineSegmentWithStartPoint:endPoint:spatialReference:

+ (instancetype) lineSegmentWithStartPoint: (AGSPoint *)  startPoint
endPoint: (AGSPoint *)  endPoint
spatialReference: (nullable AGSSpatialReference *)  spatialReference 

Creates a line segment with the provided spatial reference, start and end points.

Parameters
startPointThe start point.
endPointThe end point.
spatialReferenceThe spatial reference for the line segment to be constructed.
Returns
A new line segment.
Since
100

◆ lineSegmentWithXStart:yStart:xEnd:yEnd:

+ (instancetype) lineSegmentWithXStart: (double)  xStart
yStart: (double)  yStart
xEnd: (double)  xEnd
yEnd: (double)  yEnd 

Creates a line segment with the provided coordinate values.

Parameters
xStartThe start coordinate along x-axis.
yStartThe start coordinate along y-axis.
xEndThe end coordinate along x-axis.
yEndThe end coordinate along y-axis.
Returns
A new line segment.
Since
100

◆ lineSegmentWithXStart:yStart:xEnd:yEnd:spatialReference:

+ (instancetype) lineSegmentWithXStart: (double)  xStart
yStart: (double)  yStart
xEnd: (double)  xEnd
yEnd: (double)  yEnd
spatialReference: (nullable AGSSpatialReference *)  spatialReference 

Creates a line segment with the provided coordinate values.

Parameters
xStartThe start coordinate along x-axis.
yStartThe start coordinate along y-axis.
xEndThe end coordinate along x-axis.
yEndThe end coordinate along y-axis.
spatialReferenceThe spatial reference for the line segment to be constructed.
Returns
A new line segment.
Since
100

◆ lineSegmentWithXStart:yStart:zStart:xEnd:yEnd:zEnd:

+ (instancetype) lineSegmentWithXStart: (double)  xStart
yStart: (double)  yStart
zStart: (double)  zStart
xEnd: (double)  xEnd
yEnd: (double)  yEnd
zEnd: (double)  zEnd 

Creates a line segment with the provided coordinate values.

Parameters
xStartThe start coordinate along x-axis.
yStartThe start coordinate along y-axis.
zStartThe start coordinate along z-axis.
xEndThe end coordinate along x-axis.
yEndThe end coordinate along y-axis.
zEndThe end coordinate along z-axis.
Returns
A new line segment.
Since
100

◆ lineSegmentWithXStart:yStart:zStart:xEnd:yEnd:zEnd:spatialReference:

+ (instancetype) lineSegmentWithXStart: (double)  xStart
yStart: (double)  yStart
zStart: (double)  zStart
xEnd: (double)  xEnd
yEnd: (double)  yEnd
zEnd: (double)  zEnd
spatialReference: (nullable AGSSpatialReference *)  spatialReference 

Creates a line segment with the provided coordinate values and spatial reference.

Parameters
xStartThe start coordinate along x-axis.
yStartThe start coordinate along y-axis.
zStartThe start coordinate along z-axis.
xEndThe end coordinate along x-axis.
yEndThe end coordinate along y-axis.
zEndThe end coordinate along z-axis.
spatialReferenceThe spatial reference for the line segment to be constructed.
Returns
A new line segment.
Since
100

Property Documentation

◆ closed

- (BOOL) closed
readnonatomicassigninherited

Determines whether the segment is closed or not.

Since
100

◆ curve

- (BOOL) curve
readnonatomicassigninherited

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
readnonatomicstronginherited

The end point of the segment.

Since
100

◆ spatialReference

- (AGSSpatialReference*) spatialReference
readnonatomicstronginherited

The spatial reference of the segment.

Since
100

◆ startPoint

- (AGSPoint*) startPoint
readnonatomicstronginherited

The start point of the segment.

Since
100