Show / Hide Table of Contents

Class ReadOnlyPart

Represents an single part of an multipart geometry (polygon or polyline).

Inheritance
Object
ReadOnlyPart
Implements
IReadOnlyList<Segment>
IReadOnlyCollection<Segment>
IEnumerable<Segment>
IEnumerable
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 class ReadOnlyPart : IReadOnlyList<Segment>, IReadOnlyCollection<Segment>, IEnumerable<Segment>, IEnumerable
Remarks

A collection of Segment objects that together represent a part in a Multipart geometry. You can also access the MapPoint objects that represent the vertices of the geometry (that is, the ends of each segment), using point-based helpers such as Points.

Prior to v100.12, the only supported segment type was LineSegment. If the underlying geometry contained curve segments (HasCurves is true) then the curve information was lost when iterating through the segments in that part.

From v100.12, curve segments may be returned from Esri.ArcGISRuntime.Geometry.ReadOnlyPart.Segments. A part may contain a mix of linear and curve segments.

Properties

Name Description
Count

Gets the number of elements contained in the ICollection<T>.

EndPoint

Gets the end point of the last segment in the part, or null if the part is empty.

HasCurves

Gets a value indicating whether the part has any curves.

IsEmpty

Gets a value indicating whether the part contains no segments.

Item[Int32]

Gets or sets the element at the specified index.

PointCount

Gets the count of points in the part.

Points

Gets a collection of all points that are vertexes of the part.

SegmentCount

Gets the count of segments in the part.

SpatialReference

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

StartPoint

Gets the start point of the first segment in the part, or null if the part is empty.

Methods

Name Description
GetEndPointIndexFromSegmentIndex(Int32)

For a segment at a specified segment_index the method returns the point index of the segment's end point.

GetEnumerator()

Returns an enumerator that iterates through the collection.

GetSegmentIndexFromEndPointIndex(Int32)

Converts from a point index to a segment index that uses the given point as an end point. If the point is not an end point then a value equivalent to -1 value is returned.

GetSegmentIndexFromPointIndex(Int32, out Int32, out Int32)

Converts from a point index to a segment index of the start point and another segment index containing the end point. If the point is not a start or end point a value equivalent to -1 is set.

GetSegmentIndexFromStartPointIndex(Int32)

Converts from a point index to a segment index that uses the given point as a start point. If the point is not a start point then a value equivalent to -1 value is returned.

GetStartPointIndexFromSegmentIndex(Int32)

For a segment at a specified segment_index the method returns the point index of the segment's start point.

Name Description
IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

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

Relevant samples

Densify and generalize: A multipart geometry can be densified by adding interpolated points at regular intervals. Generalizing multipart geometry simplifies it while preserving its general shape. Densifying a multipart geometry adds more vertices at regular intervals.
In This Article
Back to top Copyright © 2022 Esri.