Segment
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. Every Part 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.
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 (Part.getPoints). 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.
Both linear segments (represented by LineSegment) and curve segments (represented by CubicBezierSegment or EllipticArcSegment) are supported. Curve and linear segments can be mixed together in the same geometry. GeometryEngine.densifyOrNull can be used to produce a polygon or polyline without curves (Geometry.hasCurves = false) from one that does have curves, by translating curve segments into multiple LineSegment instances to approximate the curve.
Since
200.1.0
See also
Inheritors
Properties
True if the segment is a CubicBezierSegment or EllipticArcSegment, false otherwise. 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.
The spatial reference for the segment. If the segment does not have a spatial reference null is returned.
The start point of the segment.