Show / Hide Table of Contents

Class PointCollection

Collection of MapPoint.

Inheritance
Object
PointCollection
Implements
IList<MapPoint>
ICollection<MapPoint>
IEnumerable<MapPoint>
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 PointCollection : IList<MapPoint>, ICollection<MapPoint>, IEnumerable<MapPoint>, IEnumerable

Constructors

Name Description
PointCollection()

Initializes a new instance of the PointCollection class without a SpatialReference

PointCollection(SpatialReference)

Initializes a new instance of the PointCollection class with a given SpatialReference

PointCollection(IEnumerable<MapPoint>)

Initializes a new instance of the PointCollection class. Populates with the supplied points.

PointCollection(IEnumerable<MapPoint>, SpatialReference)

Initializes a new instance of the PointCollection class. The spatial reference is used if the input points don't have one.

Properties

Name Description
Capacity

Gets or sets a value to reserve the space to hold the specified number of points. If the number of points are known in advance this provides a performance benefit as it avoid reallocations as the collection grows.

Count

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

IsReadOnly

Gets a value indicating whether the ICollection<T> is read-only.

Item[Int32]

Gets or sets the element at the specified index.

SpatialReference

Gets the spatial reference of this point collection.

Methods

Name Description
Add(MapPoint)

Adds an item to the ICollection<T>.

Add(Double, Double)

Adds a new point with the specified x and y coordinate to the end of this point collection.

Add(Double, Double, Double)

Adds a new point with a specified x,y,z coordinate to the end of this point collection.

AddPoints(IEnumerable<MapPoint>)

Adds a collection of points to the end of this point collection.

Clear()

Removes all items from the ICollection<T>.

Clone()

Creates a deep clone of the current PointCollection. All points are copied into the new instance.

Contains(MapPoint)

Determines whether the ICollection<T> contains a specific value.

CopyTo(MapPoint[], Int32)

Copies a collection of coordinates from this instance.

GetEnumerator()

Returns an enumerator that iterates through the collection.

GetPoint(Int32, out Double, out Double)

Gets the coordinates of a specified point

GetPoint(Int32, out Double, out Double, out Double)

Gets the coordinates of a specified 3D point

IndexOf(MapPoint)

Determines the index of a specific item in the IList<T>.

Insert(Int32, MapPoint)

Inserts an item to the IList<T> at the specified index.

Remove(MapPoint)

Removes the first occurrence of a specific object from the ICollection<T>.

RemoveAt(Int32)

Removes the IList<T> item at the specified index.

SetPoint(Int32, Double, Double)

Sets the coordinates of a specified point

SetPoint(Int32, Double, Double, Double)

Sets the coordinates of a specified point

Name Description
IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

Extension Methods

GeometryEngine.Union(IEnumerable<Geometry>)
GeometryEngine.MoveGeodetic(IEnumerable<MapPoint>, Double, LinearUnit, Double, AngularUnit, GeodeticCurveType)
GeometryEngine.ConvexHull(IEnumerable<Geometry>, Boolean)
GeometryEngine.CombineExtents(IEnumerable<Geometry>)

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

Add graphics with symbols: Use a symbol style to display a graphic on a graphics overlay.
Convex hull: Create a convex hull for a given set of points. The convex hull is a polygon with shortest perimeter that encloses a set of points. As a visual analogy, consider a set of points as nails in a board. The convex hull of the points would be like a rubber band stretched around the outermost nails.
Convex hull list: Generate convex hull polygon(s) from multiple input geometries.
In This Article
Back to top Copyright © 2022 Esri.