|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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, TriangleFans, TriangleStrips, and MultiPatches. IPointCollection can be used to create Multipoints, TriangleFans, TriangleStrips, Line-based Paths, Line-based Rings, single-path Line-based Polylines, and single-ring Line-based Polygons. Multipoints, 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 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| Method Summary | |
void |
addPoint(IPoint inPoint,
java.lang.Object before,
java.lang.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)
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 |
updatePoint(int i,
IPoint p)
Changes the ith vertex or point to be a copy of the input point. |
| Method Detail |
public int getPointCount()
throws java.io.IOException,
AutomationException
Returns the number of Points in the PointCollection. The last Point in the PointCollection has an index equal to PointCount - 1.
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IPoint getPoint(int i)
throws java.io.IOException,
AutomationException
Gets 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: 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.
i - The i (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void addPoint(IPoint inPoint,
java.lang.Object before,
java.lang.Object after)
throws java.io.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)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void updatePoint(int i,
IPoint p)
throws java.io.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
i - The i (in)p - A reference to a com.esri.arcgis.geometry.IPoint (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void queryPoints(int index,
int count,
IPoint points)
throws java.io.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)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void insertPoints(int index,
int count,
IPoint newPoints)
throws java.io.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)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void insertPointCollection(int index,
IPointCollection newPoints)
throws java.io.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)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void addPoints(int count,
IPoint newPoints)
throws java.io.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)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void addPointCollection(IPointCollection newPoints)
throws java.io.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)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setPoints(int count,
IPoint newPoints)
throws java.io.IOException,
AutomationException
count - The count (in)newPoints - A reference to a com.esri.arcgis.geometry.IPoint (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setPointCollection(IPointCollection newPoints)
throws java.io.IOException,
AutomationException
newPoints - A reference to a com.esri.arcgis.geometry.IPointCollection (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void removePoints(int index,
int count)
throws java.io.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)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IEnumVertex getEnumVertices()
throws java.io.IOException,
AutomationException
Returns an EnumVertex for the vertices in the PointCollection. The EnumVertex allows the Points to be tranversed in a sequential order.
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void replacePoints(int index,
int comingIn,
int goingAway,
IPoint newPoints)
throws java.io.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)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void replacePointCollection(int index,
int goingAway,
IPointCollection newPoints)
throws java.io.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)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void queryPoint(int index,
IPoint point)
throws java.io.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 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.
index - The index (in)point - A reference to a com.esri.arcgis.geometry.IPoint (in)
java.io.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 | |||||||||