com.esri.arcgis.geodatabase
Class TopologyGraph

java.lang.Object
  extended by com.esri.arcgis.geodatabase.TopologyGraph
All Implemented Interfaces:
ITopologyGraph, ITopologyGraph2, ITopologyGraph3, com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, Serializable

public class TopologyGraph
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, ITopologyGraph, ITopologyGraph2, ITopologyGraph3

ESRI Topology Graph object.

Description

The Topology Graph can be defined as a planar representation of the geometries in the feature classes participating in a geodatabase topology or map topology (topology will be used indifferently in this text). There is only one graph per topology. It is derived from the topology object and cannot be co-created. The topology graph is designed to allow editing of a topology without breaking adjacency or connectivity of the participating features. For example, it can be used to edit the shared boundaries between two polygons without breaking the adjacency of the geometries. Additionally use it to move a set of overlapping routes while keeping all features coincident.

For a given topology, the graph is built on demand with a user-defined envelope that bounds the features to be included in the graph. At construction time the topological relationships are discovered and persisted in memory for further uses. This means that each node in the graph is aware of all the edges that are connected to it and that each edge knows its left/right polygons. The topology elements (Node and Edges) have also the knowledge of their parents. The topology parents are the features that were used to created a given topology element. For example, a node created at the intersection of two lines will have two parents, which are the two lines.

As all topology primitives are stored in memory it is not recommended to build the topology graph for a large extent. For efficiency reasons the smaller the extent of the graph the better, however some applications could require larger extents.

The Topology Graph is composed of two types of topological primitives; edges and nodes. An edge has a fromNode and a toNode. A node is created at the feature's endpoints as well as at the intersection of feature geometries participating in the topology. For example, if two lines intersect then the graph will contain a node at the intersection, even if the two features do not contain vertices at this point.

There are a number of properties and methods that can be used on the graph and its components to:

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
TopologyGraph(Object obj)
          Construct a TopologyGraph using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 void addITopologyGraphEventsListener(ITopologyGraphEvents theListener)
          addITopologyGraphEventsListener.
 void build(IEnvelope extent, boolean preserveSelection)
          Creates topo elements from all topology feature classes covering the specified map extent.
 void deleteEdge(ITopologyEdge edge)
          Deletes the specified edge from its containing topology graph.
 void deletePseudoNodesFromSelection()
          Removes pseudo-nodes by combining edges incident on such nodes.
 boolean enumHitTest(int whichElements, IPoint queryPoint, double searchRadius, IEnumTGHitInfo[] hitInfo)
          Locates all elements of the graph within searchRadius units of the query point; whichElements is a bitwise combination of esriTopologyElement values.
 boolean equals(Object o)
          Compare this object with another
 IEnvelope getBuildExtent()
          The extent used to build the graph.
 IEnumTopologyEdge getEdges()
          The enumerator that provides access to all the edges.
 IEnumTopologyEdge getEdgeSelection()
          The enumerator for the selected edges of the topology.
 IEnvelope getExtent()
          The current extent of all topological elements in the graph.
 IEnumTopologyNode getNodes()
          The enumerator that provides access to all the nodes.
 IEnumTopologyNode getNodeSelection()
          The enumerator for the selected nodes of the topology.
 IEnumTopologyEdge getParentEdges(IFeatureClass featureClass, int fID)
          Returns the set of edges corresponding to the specified polyline or polygon feature.
 IGeometry getParentGeometry(IFeatureClass featureClass, int fID)
          Creates a geometry corresponding to the current set of edges/nodes owned by the specified parent.
 IEnumTopologyNode getParentNodes(IFeatureClass featureClass, int fID)
          Returns the set of nodes corresponding to the specified point or multipoint feature.
 int getSelectionCount(int whichElements)
          The count of selected elements of the specified types; whichElements is a bitwise combination of esriTopologyElement values.
 IEnvelope getSelectionExtent(int whichElements, boolean includeAdjacent)
          The extent of the selected subset of the graph, optionally includes extent of all edges incident on selected nodes (or on nodes incident on selected edges); whichElements is a bitwise combination of esriTopologyElement values.
 IDisplayFeedback getSelectionFeedback(int whichElements, IPoint anchor, boolean proportionalStretch)
          Creates a display feedback object to indicate the effect of a TransformSelection operation on the selected elements; whichElements is a bitwise combination of esriTopologyElement values.
 IEnumTopologyParent getSelectionParents()
          The feature class and oid of each parent of the selected set of elements.
 IDisplayFeedback getSplitMoveNodeFeedback(ITopologyNode nodeToSplit, boolean proportionalStretch, ISpatialReference outputSR)
          Creates a display feedback object to indicate the effect of a SplitMoveNode operation on the specified node.
 int hashCode()
          the hashcode for this object
 boolean hitTest(int whichElements, IPoint queryPoint, double searchRadius, IPoint hitPoint, double[] hitDistance, ITopologyElement[] hitElement)
          Locates an element of the graph nearest to the query point that is also within searchRadius units of it; whichElements is a bitwise combination of esriTopologyElement values.
 boolean hitTestSelection(int whichElements, IPoint queryPoint, double searchRadius, IPoint hitPoint, double[] hitDistance, ITopologyElement[] hitElement)
          Locates an element of the graph's selection nearest to the query point that is also within searchRadius units of it; whichElements is a bitwise combination of esriTopologyElement values.
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 boolean isHasElement(ITopologyElement element)
          Indicates if the topology graph contains the specified element.
 boolean isHasPseudoNodes()
          Indicates if the topology graph contains pseudo nodes.
 boolean isPosting()
          Indicates if the topology graph is posting.
 void post(IEnvelope[] invalidArea)
          Posts changes to topology elements back to their originating features.
 void postEx(IInvalidArea invalidArea)
          Provides the invalid area of the topology graph.
 void removeITopologyGraphEventsListener(ITopologyGraphEvents theListener)
          removeITopologyGraphEventsListener.
 boolean reshapeEdgeGeometry(ITopologyEdge edge, IPath reshapeGeometry)
          Reshapes (and possibly reinterpolates) the geometry of the specified edge.
 boolean select(int selectHow, ITopologyElement element)
          Adds the specified element to the selected subset of the graph.
 void selectByGeometry(int whichElements, int selectHow, IGeometry geometry)
          Selects nodes and/or edges that intersect the specified geometry; whichElements is a bitwise combination of esriTopologyElement values.
 void setEdgeGeometry(ITopologyEdge edge, IPath geometry)
          Assigns the path geometry to the specified edge.
 void setEmpty()
          Removes all topological elements from the graph.
 boolean setParentSelected(IFeatureClass featureClass, int fID, boolean selected)
          Selects parents of edges.
 void setSelectionEmpty(int whichType)
          Clears the specified selection set: whichType is a bitwise combination of esriTopologyNode, esriTopologyEdge.
 void splitEdgeAtDistance(ITopologyEdge edge, double distance, boolean asRatio, double tolerance, ITopologyEdge[] from, ITopologyNode[] mid, ITopologyEdge[] to)
          Adds a pseudo-node to the edge at the specified distance along the edge.
 void splitEdgeAtPoint(ITopologyEdge edge, IPoint splitPoint, double tolerance, ITopologyEdge[] from, ITopologyNode[] mid, ITopologyEdge[] to)
          Adds a pseudo-node to the edge at the point on the edge closest to the input point.
 void splitMoveNode(ITopologyNode nodeToSplit, IPoint moveTo, boolean proportionalStretch)
          Change graph connectivity: Moves the specified node, along with any selected edges incident on it.
 void transformSelection(int direction, ITransformation transformation, boolean proportionalStretch)
          Applies the specified transformation to the selected elements of the graph.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

TopologyGraph

public TopologyGraph(Object obj)
              throws IOException
Construct a TopologyGraph using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to TopologyGraph.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
TopologyGraph o = (TopologyGraph)obj; // will not work

TopologyGraph o = new TopologyGraph(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems TopologyGraph theTopologyGraph = (TopologyGraph) obj;
Method Detail

equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

addITopologyGraphEventsListener

public void addITopologyGraphEventsListener(ITopologyGraphEvents theListener)
                                     throws IOException
addITopologyGraphEventsListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.geodatabase.ITopologyGraphEvents interface.
Throws:
IOException - If there are communications problems.

removeITopologyGraphEventsListener

public void removeITopologyGraphEventsListener(ITopologyGraphEvents theListener)
                                        throws IOException
removeITopologyGraphEventsListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.geodatabase.ITopologyGraphEvents interface.
Throws:
IOException - If there are communications problems.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setEmpty

public void setEmpty()
              throws IOException,
                     AutomationException
Removes all topological elements from the graph. Any client-side references to topo elements that came from this graph should be released.

Remarks

A topology element (TopologyNode or TopologyEdge) should not be used once the TopologyGraph has been set empty. All references to this object should be released.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setSelectionEmpty

public void setSelectionEmpty(int whichType)
                       throws IOException,
                              AutomationException
Clears the specified selection set: whichType is a bitwise combination of esriTopologyNode, esriTopologyEdge.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

build

public void build(IEnvelope extent,
                  boolean preserveSelection)
           throws IOException,
                  AutomationException
Creates topo elements from all topology feature classes covering the specified map extent.

Description

Use the ITopologyGraph::Build method to construct the Topology Elements (TopologyNodes and TopologyEdges). Once "Build" is performed the Topology Elements are cached in memory and can be used. The elements have to be built before they can be used with other methods.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
build in interface ITopologyGraph
Parameters:
extent - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
preserveSelection - The preserveSelection (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtent

public IEnvelope getExtent()
                    throws IOException,
                           AutomationException
The current extent of all topological elements in the graph. This may be different than the extent used to build the graph.

Description

Returns an envelope object corresponding to the union of the all the TopologyElements extents.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getExtent in interface ITopologyGraph
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBuildExtent

public IEnvelope getBuildExtent()
                         throws IOException,
                                AutomationException
The extent used to build the graph.

Description

Returns an envelope object corresponding to the extent where the Topology Graph has been built. If the Topology Graph is not built the envelope is empty.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getBuildExtent in interface ITopologyGraph
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

hitTest

public boolean hitTest(int whichElements,
                       IPoint queryPoint,
                       double searchRadius,
                       IPoint hitPoint,
                       double[] hitDistance,
                       ITopologyElement[] hitElement)
                throws IOException,
                       AutomationException
Locates an element of the graph nearest to the query point that is also within searchRadius units of it; whichElements is a bitwise combination of esriTopologyElement values.

Description

The ITopologyGraph::HitTest method allows to retrieve the nearest TopologyElement (TopologyNode or TopologyEdge) located within a distance from an input point. This could be used to get a TopologyElement based on a user mouse click. The return value represents success (whether or not a point in the graph was hit), while the final two parameters return the distance from the hit point to the output point and a reference to the topology element that was hit.

If a reference to the hit point is needed, an instantiated IPoint reference should be passed to the hitPoint parameter. This will modify the coordinates of the existing point to those of the hit point. If the hit point is not required, a null value can be passed into this parameter.

The search radius distance must use the same distance units as the Topology or MapTopology units no conversion is performed if they are not the same.

Remarks

Note: whichElements is a bitwise combination of esriTopologyElementType values

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
hitTest in interface ITopologyGraph
Parameters:
whichElements - The whichElements (in)
queryPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
searchRadius - The searchRadius (in)
hitPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
hitDistance - The hitDistance (out: use single element array)
hitElement - A reference to a com.esri.arcgis.geodatabase.ITopologyElement (out: use single element array)
Returns:
The hit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

enumHitTest

public boolean enumHitTest(int whichElements,
                           IPoint queryPoint,
                           double searchRadius,
                           IEnumTGHitInfo[] hitInfo)
                    throws IOException,
                           AutomationException
Locates all elements of the graph within searchRadius units of the query point; whichElements is a bitwise combination of esriTopologyElement values.

Description

The ITopologyGraph::EnumHitTest method allows to retrieve all the TopologyElements (TopologyNodes and/or TopologyEdges) located within a distance from an input point. This could be used to get TopologyElements based on a user mouse click. It returns an enumerator of type IEnumTGHitInfo. Each element of the enumerator contains a reference to a TopologyElement object found within the search radius, the point where the topology element was hit and the distance from the hit point to the input point. The search radius distance must use the same distance units as the Topology or MapTopology units; no conversion is performed if they are not equal.

Remarks

Note: whichElements is a bitwise combination of esriTopologyElement values

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
enumHitTest in interface ITopologyGraph
Parameters:
whichElements - The whichElements (in)
queryPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
searchRadius - The searchRadius (in)
hitInfo - A reference to a com.esri.arcgis.geodatabase.IEnumTGHitInfo (out: use single element array)
Returns:
The hit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelectionCount

public int getSelectionCount(int whichElements)
                      throws IOException,
                             AutomationException
The count of selected elements of the specified types; whichElements is a bitwise combination of esriTopologyElement values.

Product Availability

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

Specified by:
getSelectionCount in interface ITopologyGraph
Parameters:
whichElements - The whichElements (in)
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

select

public boolean select(int selectHow,
                      ITopologyElement element)
               throws IOException,
                      AutomationException
Adds the specified element to the selected subset of the graph.

Description

The ITopologyGraph::Select method allow to modify the current set of selected TopologyElement part of the TopologyGraph. The selection behavior is determined by the esriTopologySelectionResultEnum parameter.

Remarks

If a Topology Element selected programmatically has to be moved using the Topology Edit Tool, the Selection Anchor has to be set to a valid location on the topology element.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
select in interface ITopologyGraph
Parameters:
selectHow - A com.esri.arcgis.geodatabase.esriTopologySelectionResultEnum constant (in)
element - A reference to a com.esri.arcgis.geodatabase.ITopologyElement (in)
Returns:
The selectionChanged
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNodeSelection

public IEnumTopologyNode getNodeSelection()
                                   throws IOException,
                                          AutomationException
The enumerator for the selected nodes of the topology.

Description

This method returns an IEnumTopologyNode enumerator. The enumerator will return references to all of the selected nodes in the topology graph.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getNodeSelection in interface ITopologyGraph
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumTopologyNode
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEdgeSelection

public IEnumTopologyEdge getEdgeSelection()
                                   throws IOException,
                                          AutomationException
The enumerator for the selected edges of the topology.

Description

This method returns an IEnumTopologyEdge enumerator. The enumerator will return references to all of the selected edges in the topology graph.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getEdgeSelection in interface ITopologyGraph
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumTopologyEdge
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelectionExtent

public IEnvelope getSelectionExtent(int whichElements,
                                    boolean includeAdjacent)
                             throws IOException,
                                    AutomationException
The extent of the selected subset of the graph, optionally includes extent of all edges incident on selected nodes (or on nodes incident on selected edges); whichElements is a bitwise combination of esriTopologyElement values.

Product Availability

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

Specified by:
getSelectionExtent in interface ITopologyGraph
Parameters:
whichElements - The whichElements (in)
includeAdjacent - The includeAdjacent (in)
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformSelection

public void transformSelection(int direction,
                               ITransformation transformation,
                               boolean proportionalStretch)
                        throws IOException,
                               AutomationException
Applies the specified transformation to the selected elements of the graph.

Description

This method modifies the selected TopologyElements using an ITransformation reference. It can be used to move a point or to apply more advanced coordinate transformations such as Conformal, Affine or Projective transformations. For example, it can be used to adjust a polygon using control points without breaking the adjacency with other polygons.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
transformSelection in interface ITopologyGraph
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
transformation - A reference to a com.esri.arcgis.geometry.ITransformation (in)
proportionalStretch - The proportionalStretch (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

post

public void post(IEnvelope[] invalidArea)
          throws IOException,
                 AutomationException
Posts changes to topology elements back to their originating features. Must be used within an edit session and edit operation.

Description

The ITopologyGraph::Post method should be used to commit edits performed on the topology elements of a topology graph. If the post method is not used, none of the edits performed on the graph will be committed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
post in interface ITopologyGraph
Parameters:
invalidArea - A reference to a com.esri.arcgis.geometry.IEnvelope (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isPosting

public boolean isPosting()
                  throws IOException,
                         AutomationException
Indicates if the topology graph is posting.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

reshapeEdgeGeometry

public boolean reshapeEdgeGeometry(ITopologyEdge edge,
                                   IPath reshapeGeometry)
                            throws IOException,
                                   AutomationException
Reshapes (and possibly reinterpolates) the geometry of the specified edge.

Description

This method allows reshaping the geometry of an edge using the input path. If the geometry of the TopologyEdge is vertex attributes aware (Zs and Ms) the Ms and Zs of the newly created vertices will be interpolated using existing values. For PointIDAware geometry, newly created vertices get IDs values of 0.

Remarks

Normally, the from and to nodes of the edge cannot be repositioned through use of this method. An exception is made when the edge is closed and doesn't interact with any other edges at its from/to node. In that case, edge reshaping is done by delegating to IRing::Reshape rather than IPolyline::Reshape.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
reshapeEdgeGeometry in interface ITopologyGraph
Parameters:
edge - A reference to a com.esri.arcgis.geodatabase.ITopologyEdge (in)
reshapeGeometry - A reference to a com.esri.arcgis.geometry.IPath (in)
Returns:
The reshaped
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelectionParents

public IEnumTopologyParent getSelectionParents()
                                        throws IOException,
                                               AutomationException
The feature class and oid of each parent of the selected set of elements.

Description

SelectionParents returns an enumerator of type IEnumTopologyParent that contains the information necessary (including feature class and object ID) to retrieve the features of the selected topology element.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSelectionParents in interface ITopologyGraph
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumTopologyParent
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setParentSelected

public boolean setParentSelected(IFeatureClass featureClass,
                                 int fID,
                                 boolean selected)
                          throws IOException,
                                 AutomationException
Selects parents of edges. SUbsequent edits to those edges will only be posted back to selected parents.

Description

This method allows you to control which features (TopologyParents) are affected by the next topology graph operation.

Remarks

A topology parent is a feature associated with a topology element (a topology node or topology edge). A parent can have two states; selected or unselected. This state determines if the feature will be affected by the next topology graph operation.

There is a difference between the topology selection and the parent selection. The topology selection is all the selected topology elements (Ex: ITopologyGraph::EdgeSelection or ITopologyGraph::NodeSelection). The parent selection is the state of the parent features and is independent from the topology selection. By default, for a given topology element, all of its parents are selected. However it is possible to explicitly unselect one or more parents so the element is still selected but not all of the parents are. After any operation on the topology graph the parent selection will be reset to default state (all parents selected).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setParentSelected in interface ITopologyGraph
Parameters:
featureClass - A reference to a com.esri.arcgis.geodatabase.IFeatureClass (in)
fID - The fID (in)
selected - The selected (in)
Returns:
The edgeSelectionChanged
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getParentGeometry

public IGeometry getParentGeometry(IFeatureClass featureClass,
                                   int fID)
                            throws IOException,
                                   AutomationException
Creates a geometry corresponding to the current set of edges/nodes owned by the specified parent.

Description

GetParentGeometry returns a new geometry created from the set of edges/nodes owned by the specified TopologyParent. It will construct a geometry using the edges and nodes of given parent. This means that if vertices are introduced in the TopologyGraph by the presence of non-explicit intersections (Intersections not originally present in the parents) those intersections will be reflected by the insertion of new vertices on the output geometry (See picture below).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getParentGeometry in interface ITopologyGraph
Parameters:
featureClass - A reference to a com.esri.arcgis.geodatabase.IFeatureClass (in)
fID - The fID (in)
Returns:
A reference to a com.esri.arcgis.geometry.IGeometry
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelectionFeedback

public IDisplayFeedback getSelectionFeedback(int whichElements,
                                             IPoint anchor,
                                             boolean proportionalStretch)
                                      throws IOException,
                                             AutomationException
Creates a display feedback object to indicate the effect of a TransformSelection operation on the selected elements; whichElements is a bitwise combination of esriTopologyElement values.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSelectionFeedback in interface ITopologyGraph
Parameters:
whichElements - The whichElements (in)
anchor - A reference to a com.esri.arcgis.geometry.IPoint (in)
proportionalStretch - The proportionalStretch (in)
Returns:
A reference to a com.esri.arcgis.display.IDisplayFeedback
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

splitMoveNode

public void splitMoveNode(ITopologyNode nodeToSplit,
                          IPoint moveTo,
                          boolean proportionalStretch)
                   throws IOException,
                          AutomationException
Change graph connectivity: Moves the specified node, along with any selected edges incident on it. A copy of the node, along with unselected edges, remains in the original location.

Description

SplitMoveNode is a method that allows modification of topology connectivity, by disconnecting a node and reconnecting it at a specified destination location. The selected TopologyElements (Node or Edge) Selection determines how the features (TopologyParents) are modified. The behavior is also different depending of the geometry type of the features modified (Polyline or Polygon). As any other operations on the TopologyGraph the Parent Selection will determine which parent is affected by the this operation (See ITopologyGraph::SetParentSelected topic for details on Topology Selection Vs Parent Selection)

SplitMoveNode requires that exactly one node and optionally one or more edges connected to this node are selected. It will not modify the TopologyParents if the destination point causes the features to be deleted. In this case the method will generate an error and abort the SplitMoveNode operation.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
splitMoveNode in interface ITopologyGraph
Parameters:
nodeToSplit - A reference to a com.esri.arcgis.geodatabase.ITopologyNode (in)
moveTo - A reference to a com.esri.arcgis.geometry.IPoint (in)
proportionalStretch - The proportionalStretch (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSplitMoveNodeFeedback

public IDisplayFeedback getSplitMoveNodeFeedback(ITopologyNode nodeToSplit,
                                                 boolean proportionalStretch,
                                                 ISpatialReference outputSR)
                                          throws IOException,
                                                 AutomationException
Creates a display feedback object to indicate the effect of a SplitMoveNode operation on the specified node.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSplitMoveNodeFeedback in interface ITopologyGraph
Parameters:
nodeToSplit - A reference to a com.esri.arcgis.geodatabase.ITopologyNode (in)
proportionalStretch - The proportionalStretch (in)
outputSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Returns:
A reference to a com.esri.arcgis.display.IDisplayFeedback
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

splitEdgeAtPoint

public void splitEdgeAtPoint(ITopologyEdge edge,
                             IPoint splitPoint,
                             double tolerance,
                             ITopologyEdge[] from,
                             ITopologyNode[] mid,
                             ITopologyEdge[] to)
                      throws IOException,
                             AutomationException
Adds a pseudo-node to the edge at the point on the edge closest to the input point. The node gets created at an existing vertex if one is located within the specified tolerance of the split point.

Description

That method allows splitting a TopologyEdge at a given point. A TopologyNode is then created in memory at the specified point location along the TopologyEdge. This node is a construction TopologyNode (Pseudo-node). A vertex is introduced on the TopologyParents (features) only if the TopologyNode is modified by a TopologyGraph operation.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
splitEdgeAtPoint in interface ITopologyGraph
Parameters:
edge - A reference to a com.esri.arcgis.geodatabase.ITopologyEdge (in)
splitPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
tolerance - The tolerance (in)
from - A reference to a com.esri.arcgis.geodatabase.ITopologyEdge (out: use single element array)
mid - A reference to a com.esri.arcgis.geodatabase.ITopologyNode (out: use single element array)
to - A reference to a com.esri.arcgis.geodatabase.ITopologyEdge (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

splitEdgeAtDistance

public void splitEdgeAtDistance(ITopologyEdge edge,
                                double distance,
                                boolean asRatio,
                                double tolerance,
                                ITopologyEdge[] from,
                                ITopologyNode[] mid,
                                ITopologyEdge[] to)
                         throws IOException,
                                AutomationException
Adds a pseudo-node to the edge at the specified distance along the edge. The node gets created at an existing vertex if one is located within the specified tolerance.

Description

That method allows splitting a TopologyEdge at a given distance. A TopologyNode is then created in memory at the specified distance along the TopologyEdge. This node is a construction TopologyNode (Pseudo-node). A vertex is introduced on the TopologyParents (features) only if the TopologyNode is modified by a TopologyGraph operation.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
splitEdgeAtDistance in interface ITopologyGraph
Parameters:
edge - A reference to a com.esri.arcgis.geodatabase.ITopologyEdge (in)
distance - The distance (in)
asRatio - The asRatio (in)
tolerance - The tolerance (in)
from - A reference to a com.esri.arcgis.geodatabase.ITopologyEdge (out: use single element array)
mid - A reference to a com.esri.arcgis.geodatabase.ITopologyNode (out: use single element array)
to - A reference to a com.esri.arcgis.geodatabase.ITopologyEdge (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setEdgeGeometry

public void setEdgeGeometry(ITopologyEdge edge,
                            IPath geometry)
                     throws IOException,
                            AutomationException
Assigns the path geometry to the specified edge. Reinterpolatex vertex attributes for the edge if any exist.

Description

That method allows replacing the geometry of an edge by the input path geometry. The end points of the edge must be respected.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setEdgeGeometry in interface ITopologyGraph
Parameters:
edge - A reference to a com.esri.arcgis.geodatabase.ITopologyEdge (in)
geometry - A reference to a com.esri.arcgis.geometry.IPath (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deletePseudoNodesFromSelection

public void deletePseudoNodesFromSelection()
                                    throws IOException,
                                           AutomationException
Removes pseudo-nodes by combining edges incident on such nodes. Edges and nodes in the current selection are considered.

Description

This method allows merging two connected TopologyEdges if a constructed (pseudo-node) TopologyNode separates them. A constructed node here is a TopologyNode created using ITopologyGraph::SplitEdgeAtDistance or ITopologyGraph::SplitEdgeAtPoint methods. TopologyEdge separated by regular TopologyNode will not get merged.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

deleteEdge

public void deleteEdge(ITopologyEdge edge)
                throws IOException,
                       AutomationException
Deletes the specified edge from its containing topology graph.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
deleteEdge in interface ITopologyGraph
Parameters:
edge - A reference to a com.esri.arcgis.geodatabase.ITopologyEdge (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

selectByGeometry

public void selectByGeometry(int whichElements,
                             int selectHow,
                             IGeometry geometry)
                      throws IOException,
                             AutomationException
Selects nodes and/or edges that intersect the specified geometry; whichElements is a bitwise combination of esriTopologyElement values.

Description

The ITopologyGraph::SelectByGeometry method allow to modify the current set of selected TopologyElement part of the TopologyGraph using an input geometry. The selection behavior is determined by the esriTopologySelectionResultEnum parameter.

Remarks

Only geometry types that implement the IRelationalOperator interface are valid for the pGeometry parameter. This method uses the IRelationalOperator::Disjoint (opposite of intersect) to determine if TopologyElements have to be selected. Therefore this method may select TopologyEdges that are not completely overlapping with the input geometry if the input is of type polygon or polyline. Using a point as the input geometry is a valid way to select only one edge.

whichElements is a bitwise combination of esriTopologyElement values.

If a Topology Element selected programmatically has to be moved using the Topology Edit Tool, the Selection Anchor has to be set to a valid location on the topology element.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
selectByGeometry in interface ITopologyGraph
Parameters:
whichElements - The whichElements (in)
selectHow - A com.esri.arcgis.geodatabase.esriTopologySelectionResultEnum constant (in)
geometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getParentNodes

public IEnumTopologyNode getParentNodes(IFeatureClass featureClass,
                                        int fID)
                                 throws IOException,
                                        AutomationException
Returns the set of nodes corresponding to the specified point or multipoint feature.

Description

GetParentNodes method returns an enumerator of the TopologyNodes that belong to the specified feature (TopologyParent).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getParentNodes in interface ITopologyGraph
Parameters:
featureClass - A reference to a com.esri.arcgis.geodatabase.IFeatureClass (in)
fID - The fID (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumTopologyNode
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getParentEdges

public IEnumTopologyEdge getParentEdges(IFeatureClass featureClass,
                                        int fID)
                                 throws IOException,
                                        AutomationException
Returns the set of edges corresponding to the specified polyline or polygon feature.

Description

GetParentEdges method returns an enumerator of the TopologyEdges that belong to the specified feature (TopologyParent).

Remarks

Note: Sub-tolerance features or feature that become sub-tolerance during the "cracking and clustering" process are excluded from the topology graph. For example, if you are trying to find the topology elements associated with a sub-tolerance feature using the ITopologyGraph::GetParentEdges method the returned edges enumerator will be empty.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getParentEdges in interface ITopologyGraph
Parameters:
featureClass - A reference to a com.esri.arcgis.geodatabase.IFeatureClass (in)
fID - The fID (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumTopologyEdge
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEdges

public IEnumTopologyEdge getEdges()
                           throws IOException,
                                  AutomationException
The enumerator that provides access to all the edges.

Description

This method returns an IEnumTopologyEdge enumerator. The enumerator will return references to all of the edges in the topology graph.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getEdges in interface ITopologyGraph
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumTopologyEdge
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNodes

public IEnumTopologyNode getNodes()
                           throws IOException,
                                  AutomationException
The enumerator that provides access to all the nodes.

Description

This method returns an IEnumTopologyNode enumerator. The enumerator will return references to all the topology nodes in the graph.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getNodes in interface ITopologyGraph
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumTopologyNode
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasElement

public boolean isHasElement(ITopologyElement element)
                     throws IOException,
                            AutomationException
Indicates if the topology graph contains the specified element.

Product Availability

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

Specified by:
isHasElement in interface ITopologyGraph
Parameters:
element - A reference to a com.esri.arcgis.geodatabase.ITopologyElement (in)
Returns:
The hasElement
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

hitTestSelection

public boolean hitTestSelection(int whichElements,
                                IPoint queryPoint,
                                double searchRadius,
                                IPoint hitPoint,
                                double[] hitDistance,
                                ITopologyElement[] hitElement)
                         throws IOException,
                                AutomationException
Locates an element of the graph's selection nearest to the query point that is also within searchRadius units of it; whichElements is a bitwise combination of esriTopologyElement values.

Description

The ITopologyGraph::HitTestSelection method allows to retrieve the nearest TopologyElement (TopologyNode or TopologyEdge) part of the TopologyGraph selection located within a distance from an input point. This could be used to get a TopologyElement based on a user mouse click. It returns a reference to the nearest TopologyElement object, the point where the TopologyElement was hit and the distance from the hit point to the input point. The search radius distance must use the same distance units as the Topology or MapTopology units no conversion is performed if they are not the same.

Remarks

For more information about how to use this method, such as an example and how to retrieve a hit point, see the HitTest method.

Note: whichElements is a bitwise combination of esriTopologyElement values.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
hitTestSelection in interface ITopologyGraph
Parameters:
whichElements - The whichElements (in)
queryPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
searchRadius - The searchRadius (in)
hitPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
hitDistance - The hitDistance (out: use single element array)
hitElement - A reference to a com.esri.arcgis.geodatabase.ITopologyElement (out: use single element array)
Returns:
The hit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasPseudoNodes

public boolean isHasPseudoNodes()
                         throws IOException,
                                AutomationException
Indicates if the topology graph contains pseudo nodes.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

postEx

public void postEx(IInvalidArea invalidArea)
            throws IOException,
                   AutomationException
Provides the invalid area of the topology graph.

Product Availability

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

Specified by:
postEx in interface ITopologyGraph3
Parameters:
invalidArea - A reference to a com.esri.arcgis.geodatabase.IInvalidArea (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.