Show / Hide Table of Contents

Class Part

Collection of Segment classes.

Inheritance
System.Object
Part
Implements
System.Collections.Generic.IList<Segment>
System.Collections.Generic.ICollection<Segment>
System.Collections.Generic.IEnumerable<Segment>
System.Collections.IEnumerable
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Esri.ArcGISRuntime.Geometry
Assembly: Esri.ArcGISRuntime.dll
Syntax
public class Part : IList<Segment>, ICollection<Segment>, IEnumerable<Segment>, IEnumerable

Constructors

Name Description
Part(SpatialReference)

Initializes a new instance of the Part class with a specified spatial reference.

Part(IEnumerable<MapPoint>, SpatialReference)

Initializes a new instance of the Part class. The spatial reference is checked against the input points and it is also used if the inputs have a null SpatialReference

Part(IEnumerable<Segment>, SpatialReference)

Initializes a new instance of the Part class. The spatial reference is checked against the input points and it is also used if the inputs have a null SpatialReference

Properties

Name Description
Count

Gets the number of segments contained in the part.

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 contains any curve segments.

IsEmpty

Gets a value indicating whether the part contains no segments.

IsReadOnly

Gets a value indicating whether the part is read-only.

Item[Int32]

Gets or sets the segment at a specified segment 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
Add(Segment)

Add segment to the end of the part.

AddPoint(MapPoint)

Add a new point to the end of the part. A new line segment will be added to connect the new point to the previous one.

AddPoint(Double, Double)

Add a new point to the end of the part by specifying the points x,y coordinates. A new line segment will be added to connect the new point to the previous one.

AddPoint(Double, Double, Double)

Add a new point to the end of the part by specifying the points x,y,z coordinates. A new line segment will be added to connect the new point to the previous one.

AddPoints(IEnumerable<MapPoint>)

Adds a range of points to create LineSegments in this part.

AddSegments(IEnumerable<Segment>)

Adds segments to the end of the part.

Clear()

Remove all segments from the part.

Contains(Segment)

Determines whether the Segment is in the Part.

CopyTo(Segment[], Int32)

Copies a collection of Segments to this instance.

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 Segment collection.

GetPoint(Int32)

Returns a point at a specified point index.

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.

IndexOf(Segment)

Determines the index of a specific Segment in the Part.

Insert(Int32, Segment)

Inserts a segment into the part at the specified index.

InsertPoint(Int32, MapPoint)

Inserts a point into the part at the specified point index. Line segments will be added to connect the point to adjacent segments.

InsertPoint(Int32, Double, Double)

Inserts a point specified by its x,y coordinate into the part at the specified point index. Line segments will be added to connect the point to adjacent segments.

InsertPoint(Int32, Double, Double, Double)

Inserts a point specified by its x,y,z coordinate into the part at the specified point index. Line segments will be added to connect the point to adjacent segments.

Remove(Segment)

Remove the given segment from the part.

RemoveAt(Int32)

Remove the given segment from the part.

RemovePoint(Int32)

Removes a point from the part. Segments connecting to this point will be removed and the gap filled with a new line segment.

SetPoint(Int32, MapPoint)

Replace a point in the part at the specified point index. Segments that use this point will be changed.

Name Description
IEnumerable.GetEnumerator()

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.