com.esri.arcgis.geometry
Class IEnumVertexProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geometry.IEnumVertexProxy
All Implemented Interfaces:
IEnumVertex, Externalizable, Serializable
Direct Known Subclasses:
IEnumPointAndDistanceProxy, IEnumSplitPointProxy, IEnumVertex2Proxy

public class IEnumVertexProxy
extends com.esri.arcgis.interop.Dispatch
implements IEnumVertex, 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.

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IEnumVertexProxy()
           
  IEnumVertexProxy(Object obj)
           
protected IEnumVertexProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 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 removeListener(String iidStr, Object theListener)
           
 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.
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IEnumVertexProxy

public IEnumVertexProxy()

IEnumVertexProxy

public IEnumVertexProxy(Object obj)
                 throws IOException
Throws:
IOException

IEnumVertexProxy

protected IEnumVertexProxy(Object obj,
                           String iid)
                    throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

next

public 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

Specified by:
next in interface IEnumVertex
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

public 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

Specified by:
queryNext in interface IEnumVertex
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

public 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

Specified by:
previous in interface IEnumVertex
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

public 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

Specified by:
queryPrevious in interface IEnumVertex
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

public 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

Specified by:
nextInPart in interface IEnumVertex
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

public 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

Specified by:
queryNextInPart in interface IEnumVertex
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

public 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

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

reset

public 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

Specified by:
reset in interface IEnumVertex
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_clone

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

Specified by:
esri_clone in interface IEnumVertex
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

public 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

Specified by:
resetToEnd in interface IEnumVertex
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAt

public 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

Specified by:
setAt in interface IEnumVertex
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

public 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

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

put_X

public 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

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

put_Y

public 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

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

put_Z

public 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

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

put_M

public 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

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

put_ID

public 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

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