

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
public interface IPointCollection
Provides access to members that manipulate the points of a Multipoint, Path, Ring, Polyline, Polygon, TriangleFan, TriangleStrip, or MultiPatch.
Used to access and manipulate the Points in Multipoints, Paths, Rings, Polylines, Polygons, Triangles, TriangleFans, TriangleStrips, and MultiPatches. IPointCollection can be used to create Multipoints, Triangles, TriangleFans, TriangleStrips, Linebased Paths, Linebased Rings, singlepath Linebased Polylines, and singlering Linebased Polygons. Multipoints, Triangles, TriangleFans, and TriangleStrips return references to the points in the collection. All other geometries return copies of points instead of direct references. PointCollections can be used to get, count, add, insert, query, remove, replace, set, and update the Points in a geometry. Depending on the method, Points can be manipulated as a single Point, an array of Points, or a collection of Points.
If you are using Java or a .NET enabled language, such as VB.NET, you may want to use the alternative versions of IPointCollection methods exposed by the IGeometryBridge and IGeometryBridge2 interfaces.
IPoint
,
IPointCollection
,
ISegmentCollection
,
IGeometryCollection
Method Summary  

void 
addPoint(IPoint inPoint,
Object before,
Object after)
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 
addPointCollection(IPointCollection newPoints)
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 
addPoints(int count,
IPoint newPoints)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.addPoints(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.geometry.IPoint[]) . 
IEnumVertex 
getEnumVertices()
A new enumerator for this point collection. 
IPoint 
getPoint(int i)
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. 
int 
getPointCount()
The number of points in the collection. 
void 
insertPointCollection(int index,
IPointCollection newPoints)
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 
insertPoints(int index,
int count,
IPoint newPoints)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.insertPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[]) . 
void 
queryPoint(int index,
IPoint point)
Queries for a point in the PointCollection at given index. 
void 
queryPoints(int index,
int count,
IPoint points)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.queryPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[][]) . 
void 
removePoints(int index,
int count)
Removes vertices from a Path, Ring, Polyline, or Polygon, or references to points from a Multipoint, TriangleFan, or TriangleStrip. 
void 
replacePointCollection(int index,
int goingAway,
IPointCollection newPoints)
Replaces vertices/points within a PointCollection. 
void 
replacePoints(int index,
int comingIn,
int goingAway,
IPoint newPoints)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.replacePoints(com.esri.arcgis.geometry.IPointCollection4, int, int, com.esri.arcgis.geometry.IPoint[]) . 
void 
setPointCollection(IPointCollection newPoints)
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 
setPoints(int count,
IPoint newPoints)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.setPoints(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.geometry.IPoint[]) . 
void 
updatePoint(int i,
IPoint p)
Changes the ith vertex or point to be a copy of the input point. 
Method Detail 

int getPointCount() throws IOException, AutomationException
Returns the number of Points in the PointCollection. The last Point in the PointCollection has an index equal to PointCount  1.
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.IPoint getPoint(int i) throws IOException, AutomationException
i
 The i (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void addPoint(IPoint inPoint, Object before, Object after) throws IOException, AutomationException
Adds a Point to a PointCollection. If before and after are omitted, the Point is added to the end of the PointCollection. Additionally, by specifying either the before or after index, the Point can be added at a specific location in the PointCollection.
inPoint
 A reference to a com.esri.arcgis.geometry.IPoint (in)before
 A Variant (in, optional, pass null if not required)after
 A Variant (in, optional, pass null if not required)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void updatePoint(int i, IPoint p) throws IOException, AutomationException
Updates the ith Point with a copy of the input Point. Update replaces the reference to the indexed point with a reference to the input Point.
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
//To check spatial reference efficiently
IPoint pointIn = null;
IPointCollection ptColl = null;
ISpatialReference pSpatialReferenceOfCollection = null;
//The next line will not do anything if the two projections are equal
pointIn.project(pSpatialReferenceOfCollection);
ptColl.updatePoint( 1, pointIn);
i
 The i (in)p
 A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void queryPoints(int index, int count, IPoint points) throws IOException, AutomationException
GeometryEnvironment.queryPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[][])
.
Queries a specified number (Count) of Points starting at the given index into an array of Points.
index
 The index (in)count
 The count (in)points
 A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void insertPoints(int index, int count, IPoint newPoints) throws IOException, AutomationException
GeometryEnvironment.insertPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[])
.
Inserts a specified number (Count) of Points into the PointCollection at the given index from an array of Points. The first Count points from the array are inserted.
index
 The index (in)count
 The count (in)newPoints
 A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void insertPointCollection(int index, IPointCollection newPoints) throws IOException, AutomationException
Inserts a PointCollection of Points into the PointCollection at the specified index. The resulting PointCollection does not retain information about the distinction between the old and new Point Collections.
index
 The index (in)newPoints
 A reference to a com.esri.arcgis.geometry.IPointCollection (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void addPoints(int count, IPoint newPoints) throws IOException, AutomationException
GeometryEnvironment.addPoints(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.geometry.IPoint[])
.
Adds the first specified number (Count) of Points to the PointCollection from an array of Points (with at least Count points). The Points are all added to the end of the PointCollection in the same sequence as they are ordered in the array.
count
 The count (in)newPoints
 A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void addPointCollection(IPointCollection newPoints) throws IOException, AutomationException
Adds a PointCollection of Points to the end of the PointCollection. The resulting PointCollection does not retain the division between the old PointCollection and the additional PointCollection.
newPoints
 A reference to a com.esri.arcgis.geometry.IPointCollection (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void setPoints(int count, IPoint newPoints) throws IOException, AutomationException
GeometryEnvironment.setPoints(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.geometry.IPoint[])
.
Sets the contents of the PointCollection equal to the first Count Points from the input array of Points. After SetPoints is called, the PointCollection contains only count Points from the input Point array (regardless of what it may have contained previously).
count
 The count (in)newPoints
 A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void setPointCollection(IPointCollection newPoints) throws IOException, AutomationException
Sets the contents of the PointCollection equal to the contents of the input PointCollection. After SetPointCollection is called, the PointCollection contains only the Points from the input PointCollection (regardless of what it may have contained previously).
newPoints
 A reference to a com.esri.arcgis.geometry.IPointCollection (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void removePoints(int index, int count) throws IOException, AutomationException
Removes a specified number (Count) of Points from a PointCollection starting at a given index.
index
 The index (in)count
 The count (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.IEnumVertex getEnumVertices() throws IOException, AutomationException
Returns an EnumVertex for the vertices in the PointCollection. The EnumVertex allows the Points to be tranversed in a sequential order.
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void replacePoints(int index, int comingIn, int goingAway, IPoint newPoints) throws IOException, AutomationException
GeometryEnvironment.replacePoints(com.esri.arcgis.geometry.IPointCollection4, int, int, com.esri.arcgis.geometry.IPoint[])
.
Removes a specified number (goingAway) of Points from a PointCollection starting at a given index and replaces them (starting at the same index) with a specified number (comingIn) of Points from an array of Points.
If you are using attempting to use this method from a .NET enabled language, such as VB.NET, you may need to use the ReplacePoints method provided by the IGeometryBridge interface exposed on the GeometryEnvironment object.
index
 The index (in)comingIn
 The comingIn (in)goingAway
 The goingAway (in)newPoints
 A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void replacePointCollection(int index, int goingAway, IPointCollection newPoints) throws IOException, AutomationException
Replaces a specified number (goingAway) of Points in the PointCollection begining at a given index with a PointCollection of Points (inserted at the given index).
index
 The index (in)goingAway
 The goingAway (in)newPoints
 A reference to a com.esri.arcgis.geometry.IPointCollection (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void queryPoint(int index, IPoint point) throws IOException, AutomationException
Queries the ith Point from the PointCollection. The first Point in the PointCollection has index 0, and the last Point has index equal to PointCount  1. (Alternatively, the last Point in the PointCollection can be referenced using index 1.).
Note: The output geometry must be cocreated prior to the query. The output geometry is not cocreated 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.
index
 The index (in)point
 A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 