public enum SegmentType : System.Enum, System.IComparable, System.IConvertible, System.IFormattable
Public Enum SegmentType Inherits System.Enum Implements System.IComparable, System.IConvertible, System.IFormattable
public enum SegmentType : System.Enum, System.IComparable, System.IConvertible, System.IFormattable
Public Enum SegmentType Inherits System.Enum Implements System.IComparable, System.IConvertible, System.IFormattable
Member | Description |
---|---|
Bezier | A third degree cubic Bezier curve. A non-linear segment defined by four control points. The Bezier curve starts at control point 0 (start point) and ends at control point 3 (end point) The start point and control point 1 define the tangent at the start point. Control point 2 and the end point define the tangent at the end point. The length of these tangent lines and position of the 4 control points determines the shape of the created Bezier curve. |
EllipticArc | An elliptic arc is the portion of the boundary of a 2D ellipse that connects two points. |
Line | A straight line segment between a start point and end point. |
ReadOnlyPartCollection polylineParts = polyline.Parts; // enumerate the segments to get the length double len = 0; IEnumerator<ReadOnlySegmentCollection> segments = polylineParts.GetEnumerator(); while (segments.MoveNext()) { ReadOnlySegmentCollection seg = segments.Current; foreach (Segment s in seg) { len += s.Length; // perhaps do something specific per segment type switch (s.SegmentType) { case SegmentType.Line: break; case SegmentType.Bezier: break; case SegmentType.EllipticArc: break; } } } // or use foreach pattern foreach (var part in polyline.Parts) { foreach (var segment in part) { len += segment.Length; // perhaps do something specific per segment type switch (segment.SegmentType) { case SegmentType.Line: break; case SegmentType.Bezier: break; case SegmentType.EllipticArc: break; } } }
System.Object
System.ValueType
System.Enum
ArcGIS.Core.Geometry.SegmentType
Target Platforms: Windows 11, Windows 10, Windows 8.1