Skip To Content ArcGIS for Developers Sign In Dashboard

Segment Class

class Esri::ArcGISRuntime::Segment

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

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

Esri::ArcGISRuntime::LineSegment

This class was introduced in Esri::ArcGISRuntime 100.0.

Public Functions

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

Protected Functions

Detailed Description

A Segment describes a continuous line between a start location and an end location. Every part in a Multipart geometry is a collection of segments where the end of one segment is at exactly the same location as the start of the next segment. The ArcGIS platform supports both straight and curved segments, but ArcGIS Runtime only supports LineSegment at the current release. Multipart geometries can be composed from and decomposed into segments if required; until true curves are supported fully, using point-based methods offers equivalent functionality. Polygon and Polyline are composed of one or more collections of segments.

Because a single location is shared by adjacent segments, a single Point 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, there will be one more Point than the number of segments in that same part.

Like the geometries they comprise, a Segment is immutable.

Member Function Documentation

[protected] Segment::Segment()

Default constructor.

Segment::Segment(Esri::ArcGISRuntime::Segment &&other)

Move constructor from other Segment.

Segment::Segment(const Esri::ArcGISRuntime::Segment &other)

Copy constructor from other Segment.

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

Move operator from other Segment.

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

Assignment operator from other Segment.

Segment::~Segment()

Destructor.

Esri::ArcGISRuntime::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.

Esri::ArcGISRuntime::SegmentType Segment::segmentType() const

Gets the segment type.

Returns the type of this Segment.

Esri::ArcGISRuntime::SpatialReference Segment::spatialReference() const

Gets the SpatialReference.

Returns the spatial reference of this segment.

Esri::ArcGISRuntime::Point Segment::startPoint() const

Gets the start point.

Returns the start point of this segment.

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

Equivalency operator.

Returns whether this object and other are equivalent.


Feedback on this topic?