com.esri.arcgis.geometry
Interface IEnumVertex

All Superinterfaces:
Serializable
All Known Subinterfaces:
IEnumPointAndDistance, IEnumSplitPoint, IEnumVertex2
All Known Implementing Classes:
IEnumPointAndDistanceProxy, IEnumSplitPointProxy, IEnumVertex2Proxy, IEnumVertexProxy

public interface IEnumVertex
extends Serializable

Provides access to members that iterate over the vertices or points of a geometry (see the EnumVertices property of the IPointCollection interface).

Superseded By

IEnumVertex2

Description

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


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

next

void next(IPoint[] outVertex,
          int[] outPartIndex,
          int[] vertexIndex)
          throws IOException,
                 AutomationException
Returns the next vertex and its location within the geometry.

Description

The Next method returns the next vertex in the enumerator.

Remarks

See picture for a graphical explanation of some of the IEnumVertex methods.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
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)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryNext

void queryNext(IPoint vertex,
               int[] outPartIndex,
               int[] vertexIndex)
               throws IOException,
                      AutomationException
Copies the next vertex to the input parameter and returns its location in the geometry.

Description

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.

Remarks

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
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)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

previous

void previous(IPoint[] outVertex,
              int[] outPartIndex,
              int[] vertexIndex)
              throws IOException,
                     AutomationException
Returns the previous vertex and its location in the geometry.

Description

The Previous method returns the vertex before the current location of the Enumerator.

Remarks

See picture for a graphical explanation of some of the IEnumVertex methods.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
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)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryPrevious

void queryPrevious(IPoint vertex,
                   int[] outPartIndex,
                   int[] vertexIndex)
                   throws IOException,
                          AutomationException
Copies the previous vertex to the input parameter and returns its location in the geometry.

Description

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.

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
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)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

nextInPart

void nextInPart(IPoint[] outVertex,
                int[] outVertexIndex)
                throws IOException,
                       AutomationException
Returns the next vertex in current part, or goes back to the first vertex in the part after last vertex in part is encountered.

Description

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
outVertex - A reference to a com.esri.arcgis.geometry.IPoint (out: use single element array)
outVertexIndex - The outVertexIndex (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryNextInPart

void queryNextInPart(IPoint vertex,
                     int[] outVertexIndex)
                     throws IOException,
                            AutomationException
Copies the next vertex in the current part to the input parameter and returns its location in current part. Continues with the first vertex in the part if already at the end.

Description

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.

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
vertex - A reference to a com.esri.arcgis.geometry.IPoint (in)
outVertexIndex - The outVertexIndex (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

skip

void skip(int numVertices)
          throws IOException,
                 AutomationException
Skips forward or backward over a specified number of vertices.

Description

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).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
numVertices - The numVertices (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reset

void reset()
           throws IOException,
                  AutomationException
Starts from the beginning of the geometry the next time Next is called.

Description

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)

Remarks

See picture for a graphical explanation of some of the IEnumVertex methods.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_clone

IEnumVertex esri_clone()
                       throws IOException,
                              AutomationException
Returns a copy of this enumerator positioned at the same vertex.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.geometry.IEnumVertex
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

resetToEnd

void resetToEnd()
                throws IOException,
                       AutomationException
Starts from the end of the geometry the next time Previous is called.

Description

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).

Remarks

See picture for a graphical explanation of some of the IEnumVertex methods.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAt

void setAt(int iPart,
           int iVertex)
           throws IOException,
                  AutomationException
Resets enumerator to specific location.

Description

The SetAt method allows setting the Enumerator to a particular position.

Remarks

See picture for a graphical explanation of some of the IEnumVertex methods.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
iPart - The iPart (in)
iVertex - The iVertex (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isLastInPart

boolean isLastInPart()
                     throws IOException,
                            AutomationException
Indicates if the current vertex is last in the current part.

Description

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The isLastInPart
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

put_X

void put_X(double x)
           throws IOException,
                  AutomationException
Sets the X coordinate of the current vertex. For segment-based geometries, this will modify a pair of segments.

Description

Sets the X coordinate of the current enumerated vertex.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
x - The x (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

put_Y

void put_Y(double y)
           throws IOException,
                  AutomationException
Sets the Y coordinate of the current vertex. For segment-based geometries, this will modify a pair of segments.

Description

Sets the Y coordinate of the current enumerated vertex.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
y - The y (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

put_Z

void put_Z(double z)
           throws IOException,
                  AutomationException
Sets the Z coordinate of the current vertex. For segment-based geometries, this will modify a pair of segments.

Description

Sets the Z attribute of the current enumerated vertex.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
z - The z (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

put_M

void put_M(double m)
           throws IOException,
                  AutomationException
Sets the M attribute of the current vertex. For segment-based geometries, this will modify a pair of segments.

Description

Sets the M attribute of the current enumerated vertex.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
m - The m (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

put_ID

void put_ID(int pointID)
            throws IOException,
                   AutomationException
Sets the ID attribute of the current vertex. For segment-based geometries, this will modify a pair of segments.

Description

Sets the PointID attribute of the current enumerated vertex.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
pointID - The pointID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.