Skip To Content ArcGIS for Developers Sign In Dashboard

Segment Class


A linear shape defined by a start point, an end point, and a SpatialReference. More...

Header: #include <Segment>
Since: Esri::ArcGISRuntime 100.0
Inherited By:


Public Functions

Segment(const Segment &other)
Segment(Segment &&other)
Point endPoint() const
bool isClosed() const
SegmentType segmentType() const
SpatialReference spatialReference() const
Point startPoint() const
Segment &operator=(const Segment &other)
Segment &operator=(Segment &&other)
bool operator==(const Segment &other) const

Protected Functions

Detailed Description

A linear shape defined by a start point, an end point, and a SpatialReference.

Segment is an abstract base class from which different segment classes inherit, each defining a different way of connecting the start and end point. Currently only one segment type, LineSegment, is available. Polygons and Polylines are composed of one or more collections of Segments.

Member Function Documentation

Segment::Segment(const Segment &other)

Copy constructor from other Segment.

Segment::Segment(Segment &&other)

Move constructor from other Segment.

[protected] Segment::Segment()

Default constructor.



Point Segment::endPoint() const

Gets the end point.

Returns the end point of this segment.

bool Segment::isClosed() const

Gets whether this segment is closed.

Returns whether this segment has a start point and end point at the same location.

SegmentType Segment::segmentType() const

Gets the segment type.

Returns the type of this Segment.

SpatialReference Segment::spatialReference() const

Gets the SpatialReference.

Returns the spatial reference of this segment.

Point Segment::startPoint() const

Gets the start point.

Returns the start point of this segment.

Segment &Segment::operator=(const Segment &other)

Assignment operator from other Segment.

Segment &Segment::operator=(Segment &&other)

Move operator from other Segment.

bool Segment::operator==(const Segment &other) const

Equivalency operator.

Returns whether this object and other are equivalent.

Feedback on this topic?