Show / Hide Table of Contents

Class Segment

An edge of a multipart geometry, connecting a start to an end point.

Inheritance
System.Object
Segment
CubicBezierSegment
EllipticArcSegment
LineSegment
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Esri.ArcGISRuntime.Geometry
Assembly: Esri.ArcGISRuntime.dll
Syntax
public abstract class Segment
Remarks

A segment describes a continuous line between a start location and an end location. Every ReadOnlyPart 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 MapPoint object is used to represent the shared location when you iterate through the points in a part (Points). 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. Densify(Geometry, Double) can be used to produce a polygon or polyline without curves (HasCurves = false) from one that does have curves, by translating curve segments into multiple LineSegment instances to approximate the curve.

Properties

Name Description
EndPoint

Gets the end point of the segment.

IsClosed

Gets a value indicating whether the segment is closed (has a matching start and end point).

IsCurve

Gets a value indicating whether this segment is a curve, or a line segment.

SpatialReference

Gets the spatial reference for the segment, or null if the segment does not have a spatial reference.

StartPoint

Gets the start point of the segment.

Methods

Name Description
IsEqual(Segment)

Checks if two segments and their spatial references are equal.

Applies to

TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7
In This Article
Back to top Copyright © 2022 Esri.