|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IEnumVertex
Provides access to members that iterate over the vertices or points of a geometry (see the EnumVertices property of the IPointCollection interface).
The methods on IEnumVertex interface can be used to access points of a point collection. EnumVertex is a lightweight object that you can use to pass around between routines. You may wish to use this enumerator in preference to the Points array returned by the IPointCollection::Points property, as it allows you to directly change the x-, y-, z-, m-, and ID properties of each Point, although Points cannot be removed or replaced using this interface. The IEnumVertex has knowledge of parts within multipart shapes and may therefore be convenient for use on a multipart shape, such as a Polygon or Polyline. Those methods are more efficient than the IPointCollection methods to access a large number of points in a sequential order for polyline and polygon. The collection methods transform absolute point index into a part relative index, enumerators don't.
Method Summary | |
---|---|
IEnumVertex |
esri_clone()
Returns a copy of this enumerator positioned at the same vertex. |
boolean |
isLastInPart()
Indicates if the current vertex is last in the current part. |
void |
next(IPoint[] outVertex,
int[] outPartIndex,
int[] vertexIndex)
Returns the next vertex and its location within the geometry. |
void |
nextInPart(IPoint[] outVertex,
int[] outVertexIndex)
Returns the next vertex in current part, or goes back to the first vertex in the part after last vertex in part is encountered. |
void |
previous(IPoint[] outVertex,
int[] outPartIndex,
int[] vertexIndex)
Returns the previous vertex and its location in the geometry. |
void |
put_ID(int pointID)
Sets the ID attribute of the current vertex. |
void |
put_M(double m)
Sets the M attribute of the current vertex. |
void |
put_X(double x)
Sets the X coordinate of the current vertex. |
void |
put_Y(double y)
Sets the Y coordinate of the current vertex. |
void |
put_Z(double z)
Sets the Z coordinate of the current vertex. |
void |
queryNext(IPoint vertex,
int[] outPartIndex,
int[] vertexIndex)
Copies the next vertex to the input parameter and returns its location in the geometry. |
void |
queryNextInPart(IPoint vertex,
int[] outVertexIndex)
Copies the next vertex in the current part to the input parameter and returns its location in current part. |
void |
queryPrevious(IPoint vertex,
int[] outPartIndex,
int[] vertexIndex)
Copies the previous vertex to the input parameter and returns its location in the geometry. |
void |
reset()
Starts from the beginning of the geometry the next time Next is called. |
void |
resetToEnd()
Starts from the end of the geometry the next time Previous is called. |
void |
setAt(int iPart,
int iVertex)
Resets enumerator to specific location. |
void |
skip(int numVertices)
Skips forward or backward over a specified number of vertices. |
Method Detail |
---|
void next(IPoint[] outVertex, int[] outPartIndex, int[] vertexIndex) throws IOException, AutomationException
The Next method returns the next vertex in the enumerator.
See picture for a graphical explanation of some of the IEnumVertex methods.
outVertex
- A reference to a com.esri.arcgis.geometry.IPoint (out: use single element array)outPartIndex
- The outPartIndex (out: use single element array)vertexIndex
- The vertexIndex (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void queryNext(IPoint vertex, int[] outPartIndex, int[] vertexIndex) throws IOException, AutomationException
The QueryNext method returns the next vertex in the enumerator. As oppose to the Next method the output point needs to be cocreated before to call QueryNext. The QueryNext method is faster than the Next method because it doesn't need to create a point internally each time. The QueryNext method only populates the output point. For example, creating the point only once outside a loop and reuse it in the QueryNext method will be faster than calling Next each time.
Note: The output geometry must be co-created prior to use 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.
vertex
- A reference to a com.esri.arcgis.geometry.IPoint (in)outPartIndex
- The outPartIndex (out: use single element array)vertexIndex
- The vertexIndex (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void previous(IPoint[] outVertex, int[] outPartIndex, int[] vertexIndex) throws IOException, AutomationException
The Previous method returns the vertex before the current location of the Enumerator.
See picture for a graphical explanation of some of the IEnumVertex methods.
outVertex
- A reference to a com.esri.arcgis.geometry.IPoint (out: use single element array)outPartIndex
- The outPartIndex (out: use single element array)vertexIndex
- The vertexIndex (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void queryPrevious(IPoint vertex, int[] outPartIndex, int[] vertexIndex) throws IOException, AutomationException
The QueryPrevious method returns the vertex before the current location of the Enumerator. As oppose to the Previous method the output point needs to be cocreated before to call QueryPrevious. The QueryPrevious method is faster than the Previous method because it doesn't need to create a point internally each time. The QueryPrevious method only populates the output point. For example, creating the point only once outside a loop and reuse it in the QueryPrevious method will be faster than calling Previous each time.
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.
vertex
- A reference to a com.esri.arcgis.geometry.IPoint (in)outPartIndex
- The outPartIndex (out: use single element array)vertexIndex
- The vertexIndex (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void nextInPart(IPoint[] outVertex, int[] outVertexIndex) throws IOException, AutomationException
The NextInPart method returns the Next vertex in the current part only. If the Enumerator reaches the end of the current part it is reset to the start point of that part and returns the start point.
outVertex
- A reference to a com.esri.arcgis.geometry.IPoint (out: use single element array)outVertexIndex
- The outVertexIndex (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void queryNextInPart(IPoint vertex, int[] outVertexIndex) throws IOException, AutomationException
The QueryNextInPart method returns the Next vertex in the current part only. If the Enumerator reaches the end of the current part it is reset to the start point of that part and returns the first point. As oppose to the NextInPart method the output point needs to be cocreated before to call QueryNextInPart. The QueryNextInPart method is faster than the NextInPart method because it doesn't need to create a point internally each time. The QueryNextInPart method only populates the output point. For example, creating the point only once outside a loop and reuse it in the QueryNextInPart method will be faster than calling NextInPart each time.
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.
vertex
- A reference to a com.esri.arcgis.geometry.IPoint (in)outVertexIndex
- The outVertexIndex (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void skip(int numVertices) throws IOException, AutomationException
The Skip method allows jumping over a given number of positions in the enumerator. The Skip method can be used to go forward (positive value) or backward (negative value).
numVertices
- The numVertices (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void reset() throws IOException, AutomationException
The Reset method sets the Enumerator in the position just before the first point. Therefore calling the Next method returns the first point of the Enumerator (PartIndex = 0 and VertexIndex = 0)
See picture for a graphical explanation of some of the IEnumVertex methods.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnumVertex esri_clone() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void resetToEnd() throws IOException, AutomationException
The ResetToEnd method sets the Enumerator in the position just after the last point. Therefore calling the Previous method returns the last point of the Enumerator (PartIndex = PartCount -1 and VertexIndex = VertexCountInPart-1).
See picture for a graphical explanation of some of the IEnumVertex methods.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setAt(int iPart, int iVertex) throws IOException, AutomationException
The SetAt method allows setting the Enumerator to a particular position.
See picture for a graphical explanation of some of the IEnumVertex methods.
iPart
- The iPart (in)iVertex
- The iVertex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isLastInPart() throws IOException, AutomationException
The IsLastInPart method returns whether or not the Enumerator is located on the last point of a given. For example for a polyline with 2 parts of 4 vertices each, the IsLastInPart method would return 'true' for PartIndex = 0 and VertexIndex = 4 and for PartIndex = 1 and VertexIndex = 4.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void put_X(double x) throws IOException, AutomationException
Sets the X coordinate of the current enumerated vertex.
x
- The x (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void put_Y(double y) throws IOException, AutomationException
Sets the Y coordinate of the current enumerated vertex.
y
- The y (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void put_Z(double z) throws IOException, AutomationException
Sets the Z attribute of the current enumerated vertex.
z
- The z (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void put_M(double m) throws IOException, AutomationException
Sets the M attribute of the current enumerated vertex.
m
- The m (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void put_ID(int pointID) throws IOException, AutomationException
Sets the PointID attribute of the current enumerated vertex.
pointID
- The pointID (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 |