Segment class final

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. ArcGIS software supports both linear segments (represented by LineSegment) and curve segments (represented by CubicBezierSegment and EllipticArcSegment).

GeometryEngine.densify 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 ArcGISPoint 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 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 a MultipartBuilder, and if a geometry has curves (Geometry.hasCurves is true) then curve segments are returned where applicable from the ImmutablePart collections that comprise the multipart geometry. Curve and linear segments can be mixed together in the same geometry.

Implemented types
Implementers

Properties

endPoint ArcGISPoint
The end point of the segment.
no setter
hashCode int
The hash code for this object.
no setteroverride
isClosed bool
Indicates is a segment is closed, it has a matching start and end point.
no setter
isCurve bool
False if the object is a LineSegment; true otherwise.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spatialReference SpatialReference?
The spatial reference for the segment.
no setter
startPoint ArcGISPoint
The start point of the segment.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override