Interface IPointCollection

Namespace
ESRI.ArcGIS.Geometry
Assembly
ESRI.Server.Geometry.dll

Provides access to members that manipulate the points of a Multipoint, Path, Ring, Polyline, Polygon, TriangleFan, TriangleStrip, or MultiPatch.

[Guid("DE08A214-4FC2-11D1-834E-0000F8775BE9")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IPointCollection

Properties

EnumVertices

A new enumerator for this point collection.

IEnumVertex EnumVertices { get; }

Property Value

IEnumVertex

Point[int]

A copy of the ith vertex of a Path, Ring, Polyline, or Polygon; or a reference to the ith point of a Multipoint, TriangleFan, or TriangleStrip.

IPoint Point[int i] { get; }

Parameters

i int

Property Value

IPoint

Examples

Sample Snippet

<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
<img src="./bitmaps/point.gif" align="baseline"></span></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
 </p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
       </span> <span style=
"COLOR: blue">public</span> <span style="COLOR: blue">static</span>
<span style="COLOR: teal">IGeometry</span>
GetPointGeometry()</span></span></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
       </span> {</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">const</span> <span style=
"COLOR: blue">double</span> Min = -10;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">const</span> <span style=
"COLOR: blue">double</span> Max = 10;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: teal">Random</span> random = <span style=
"COLOR: blue">new</span> <span style=
"COLOR: teal">Random</span>();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">double</span> x = Min + (Max - Min) *
random.NextDouble();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">double</span> y = Min + (Max - Min) *
random.NextDouble();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">double</span> z = Min + (Max - Min) *
random.NextDouble();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
 </p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">

IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point = ConstructPoint3D(x, y, z);</span></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
 </p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">
<span style=
"mso-spacerun: yes">           </span>
MakeZAware(point <span style="COLOR: blue">as</span> <span style=
"COLOR: teal">IGeometry</span>);</span></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">return</span> point <span style=
"COLOR: blue">as</span> <span style=
"COLOR: teal">IGeometry</span>;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
       </span> }</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">       </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
private</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
static</span> <span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
ConstructPoint3D(</span><span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">double</span>
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
x,</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
double</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
y,</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
double</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
z)</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">       </span>
{</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">           </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point = ConstructPoint2D(x, y);</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">           </span>
point.Z = z;<br>
<br>
<span style=
"mso-spacerun: yes">           </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
return</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">       </span>
}<br>
<br style="mso-special-character: line-break">
<br style="mso-special-character: line-break"></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">       </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
private</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
static</span> <span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
ConstructPoint2D(</span><span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">double</span>
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
x,</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
double</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
y)</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">       </span>
{</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">           </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point =</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
new</span> <span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
PointClass</span><span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">           </span>
point.PutCoords(x, y);<br>
<span style="mso-spacerun: yes"> </span></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">           </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
return</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal"><span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">       </span>
}</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
       </span> <span style=
"COLOR: blue">private</span> <span style=
"COLOR: blue">static</span> <span style="COLOR: blue">void</span>
MakeZAware(<span style="COLOR: teal">IGeometry</span>
geometry)</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
       </span> {</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: teal">IZAware</span> zAware = geometry
<span style="COLOR: blue">as</span> <span style=
"COLOR: teal">IZAware</span>;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
zAware.ZAware = <span style="COLOR: blue">true</span>;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
       </span> }</span></p>

Remarks

Note: Since a copy of the point is returned by Point (get_Point) for path, ring, polyline and polygon the IPointCollection::UpdatePoint method must be used to update points on those geometry types.

PointCount

The number of points in the collection.

int PointCount { get; }

Property Value

int

Methods

AddPoint(IPoint, ref object, ref object)

Adds a vertex to a Path, Ring, Polyline, or Polygon; or adds a reference to the input point to a Multipoint, TriangleFan, or TriangleStrip.

void AddPoint(IPoint inPoint, ref object before, ref object after)

Parameters

inPoint IPoint
before object
after object

AddPointCollection(IPointCollection)

Adds copies of points in the input point collection to this Path, Ring, Polyline, or Polygon; or adds references to the points in the collection to this Multipoint, TriangleFan, or TriangleStrip.

void AddPointCollection(IPointCollection newPoints)

Parameters

newPoints IPointCollection

AddPoints(int, ref IPoint)

Adds copies of the input points as vertices to this Path, Ring, Polyline, or Polygon; or references to the input points to this Multipoint, TriangleFan, or TriangleStrip. This method is intended for internal use only.

void AddPoints(int Count, ref IPoint newPoints)

Parameters

Count int
newPoints IPoint

AddWKSPoints(int, ref WKSPoint)

Adds vertices to this Path, Ring, Polyline, or Polygon, or adds new points to this Multipoint, TriangleFan, or TriangleStrip.

void AddWKSPoints(int Count, ref WKSPoint pointStructures)

Parameters

Count int
pointStructures WKSPoint

InsertPointCollection(int, IPointCollection)

Inserts copies of points, from the input point collection, as vertices into this Path, Ring, Polyline, or Polygon; or references to points in the input point collection into this Multipoint, TriangleFan, or TriangleStrip.

void InsertPointCollection(int Index, IPointCollection newPoints)

Parameters

Index int
newPoints IPointCollection

InsertPoints(int, int, ref IPoint)

Inserts copies of the input points as vertices into a Path, Ring, Polyline, or Polygon; or references to the input points into a Multipoint, TriangleFan, or TriangleStrip. This method is intended for internal use only.

void InsertPoints(int Index, int Count, ref IPoint newPoints)

Parameters

Index int
Count int
newPoints IPoint

InsertWKSPoints(int, int, ref WKSPoint)

Inserts new vertices/points into this Path, Ring, Polyline, Polygon, Multipoint, TriangleFan, TriangleStrip, or MultiPatch.

void InsertWKSPoints(int Index, int Count, ref WKSPoint newPoints)

Parameters

Index int
Count int
newPoints WKSPoint

QueryPoint(int, IPoint)

Queries for a point in the PointCollection at given index.

void QueryPoint(int Index, IPoint Point)

Parameters

Index int
Point IPoint

Remarks

Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

QueryPoints(int, int, ref IPoint)

Copies some points to an existing array of points. This method is intended for internal use only.

void QueryPoints(int Index, int Count, ref IPoint Points)

Parameters

Index int
Count int
Points IPoint

QueryWKSPoints(int, int, out WKSPoint)

Copies vertices'/points' coordinates to the array of point structures.

void QueryWKSPoints(int Index, int Count, out WKSPoint pointStructures)

Parameters

Index int
Count int
pointStructures WKSPoint

RemovePoints(int, int)

Removes vertices from a Path, Ring, Polyline, or Polygon, or references to points from a Multipoint, TriangleFan, or TriangleStrip.

void RemovePoints(int Index, int Count)

Parameters

Index int
Count int

ReplacePointCollection(int, int, IPointCollection)

Replaces vertices/points within a PointCollection.

void ReplacePointCollection(int Index, int goingAway, IPointCollection newPoints)

Parameters

Index int
goingAway int
newPoints IPointCollection

ReplacePoints(int, int, int, ref IPoint)

Replaces vertices/points within a PointCollection.

void ReplacePoints(int Index, int comingIn, int goingAway, ref IPoint newPoints)

Parameters

Index int
comingIn int
goingAway int
newPoints IPoint

SetPointCollection(IPointCollection)

Replaces all vertices of this Path, Ring, Polyline, or Polygon with copies of the points in the input collection; or all points of this Multipoint, TriangleFan, or TriangleStrip with references to points from the input collection.

void SetPointCollection(IPointCollection newPoints)

Parameters

newPoints IPointCollection

SetPoints(int, ref IPoint)

Replaces all existing vertices of this Path, Ring, Polyline, or Polygon with copies of the input points; or all existing points of this Multipoint, TriangleFan, or TriangleStrip with references to the input points (for C++ and VB users only).

void SetPoints(int Count, ref IPoint newPoints)

Parameters

Count int
newPoints IPoint

SetWKSPoints(int, ref WKSPoint)

Replaces all vertices of this Path, Ring, Polyline, or Polygon with new ones, or replaces all points of this Multipoint, TriangleFan, or TriangleStrip with new ones.

void SetWKSPoints(int Count, ref WKSPoint pointStructures)

Parameters

Count int
pointStructures WKSPoint

UpdatePoint(int, IPoint)

Changes the ith vertex or point to be a copy of the input point.

void UpdatePoint(int i, IPoint p)

Parameters

i int
p IPoint

Remarks

For efficiency UpdatePoint does not check if the spatial reference of the input point is equal to the spatial reference of the PointCollection. Please make sure that the spatial reference of the input point is equal to the spatial reference of the PointCollection before you pass the point in.

Note : You can also explicitly check the spatial reference by using IClone::IsEqual

[C#]

//Point to use in the UpdatePoint call
IPoint point = new PointClass() as IPoint;

//Point Collection to UpdatePoint
IPointCollection ptCollection = new MultipointClass() as IPointCollection;

//Set the spatial reference of the Point Collection usually it has already been set
ISpatialReferenceFactory srFactory = new SpatialReferenceEnvironmentClass() as ISpatialReferenceFactory;
IGeometry geom = ptCollection as IGeometry;
geom.SpatialReference = srFactory.CreateProjectedCoordinateSystem((int)esriSRProjCSType.esriSRProjCS_NAD1983N_AmericaLambert);
ISpatialReference sr = geom.SpatialReference;

//This line does nothing if the two spatial references are already equal
point.Project(sr);

//The integer is the number of point in the point collection you are updating
ptCollection.UpdatePoint(1, point);