Show / Hide Table of Contents

Class Segment

A class representing an edge of a multipart geometry, connecting a start to an end point.

Inheritance
Object
Segment
CubicBezierSegment
EllipticArcSegment
LineSegment
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
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. The ArcGIS Platform, including ArcGIS Maps SDK for .NET, supports both linear segments (represented by LineSegment) and curve segments (represented by CubicBezierSegment and EllipticArcSegment).

Densify(Geometry, Double) can translate curve segments into multiple LineSegment instances to approximate the curve.

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. 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 MapPoint object is used to represent the shared location when you iterate through the map points in a part. As a result, when iterating through the map points in a part of a Polyline, there is one more MapPoint 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.

Segments are used as the building blocks of the parts of Polygon and Polyline classes.

From v100.12, curve segments are supported in geometry editing workflows. You can add curve segments to a MultipartBuilder<T>, and if a geometry has curves (HasCurves is true) then curve segments are returned where applicable from the collections that comprise the multipart geometry. Curve and linear segments can be mixed together in the same geometry.

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.0
.NET 6.0100.13 - 200.0
.NET 6.0 Windows100.13 - 200.0
.NET 6.0 Android200
.NET 6.0 iOS200
.NET Framework100.0 - 200.0
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Android100.0 - 100.15
iOS100.0 - 100.15
UWP100.0 - 200.0
In This Article
Back to top Copyright © 2022 Esri.