Segment QML Type

A segment represents an edge of a multipart geometry, connecting a start to an end point. More...

Import Statement: import Esri.ArcGISRuntime 100.15
Since: Esri.ArcGISRuntime 100.0
Inherits:

Object

Inherited By:

CubicBezierSegment, EllipticArcSegment, and LineSegment

Properties

Signals

Methods

Detailed Description

Note: You cannot declare or create a component of this type in QML code.

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 LineSegment) and curve segments (represented by CubicBezierSegment and EllipticArcSegment).

GeometryEngine::densify(Geometry, double) can translate curve segments into multiple LineSegment instances to approximate the curve.

Every ImmutablePart in a Multipart geometry is a collection of Segment instances, where the end of one segment is at exactly the same location as the start of the following segment. Multipart geometries can be composed from and decomposed into their constituent segments if required.

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 or polygon, there is one more point than the number of segments in that same part.

Segments are immutable so you can not 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 Esri.ArcGISRuntime 100.12, curve segments are supported in geometry editing workflows. You can add curve segments to a MultipartBuilder, and if a geometry has curves (Geometry::hasCurves is true) then curve segments are be returned where applicable from the ImmutablePart collections that comprise the multipart geometry. Curve and linear segments can be mixed together in the same geometry.

Property Documentation

closed : bool

Returns whether the Segment is closed (read-only).


endPoint : Point

Returns the end point of this Segment (read-only).


isCurve : bool

false if the object is a LineSegment; true otherwise (read-only).

Prior to Esri.ArcGISRuntime 100.12, only LineSegment instances were supported when creating new geometries using a MultipartBuilder or iterating the Segment instances in an existing Multipart geometry.

From Esri.ArcGISRuntime 100.12, you can add curve segments (CubicBezierSegment, EllipticArcSegment) when using a MultipartBuilder, and get them back from an existing Multipart geometry when Geometry::hasCurves is true.

This property was introduced in Esri.ArcGISRuntime 100.12.

See also GeometryBuilder::hasCurves, Part::hasCurves, CubicBezierSegment, and EllipticArcSegment.


segmentType : SegmentType

Returns the Enums.SegmentType type of this Segment (read-only).


spatialReference : SpatialReference

Returns the spatial reference of this Segment (read-only).


startPoint : Point

Returns the start point of this Segment (read-only).


Signal Documentation

closedChanged()

Emitted when the closed property of the Segment changes.

Note: The corresponding handler is onClosedChanged.

This signal was introduced in Esri.ArcGISRuntime 100.4.


endPointChanged()

Emitted when the endPoint of the Segment changes.

Note: The corresponding handler is onEndPointChanged.


spatialReferenceChanged()

Emitted when the spatialReference of the Segment changes.

Note: The corresponding handler is onSpatialReferenceChanged.


startPointChanged()

Emitted when the startPoint of the Segment changes.

Note: The corresponding handler is onStartPointChanged.


Method Documentation

bool equals(Segment*other)

Returns true if this segment is equivalent to other.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.