|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.geodatabase.TopologyGraph
public class TopologyGraph
Esri Topology Graph object.
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:
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 |
---|
public TopologyGraph(Object obj) throws IOException
obj
to TopologyGraph
. *
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
IOException
- if there are interop problems
TopologyGraph theTopologyGraph = (TopologyGraph) obj;
Method Detail |
---|
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void addITopologyGraphEventsListener(ITopologyGraphEvents theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.geodatabase.ITopologyGraphEvents interface.
IOException
- If there are communications problems.public void removeITopologyGraphEventsListener(ITopologyGraphEvents theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.geodatabase.ITopologyGraphEvents interface.
IOException
- If there are communications problems.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setEmpty() throws IOException, AutomationException
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.
setEmpty
in interface ITopologyGraph
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSelectionEmpty(int whichType) throws IOException, AutomationException
setSelectionEmpty
in interface ITopologyGraph
whichType
- The whichType (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void build(IEnvelope extent, boolean preserveSelection) throws IOException, AutomationException
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.
build
in interface ITopologyGraph
extent
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)preserveSelection
- The preserveSelection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope getExtent() throws IOException, AutomationException
Returns an envelope object corresponding to the union of the all the TopologyElements extents.
getExtent
in interface ITopologyGraph
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope getBuildExtent() throws IOException, AutomationException
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.
getBuildExtent
in interface ITopologyGraph
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean hitTest(int whichElements, IPoint queryPoint, double searchRadius, IPoint hitPoint, double[] hitDistance, ITopologyElement[] hitElement) throws IOException, AutomationException
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.
Note: whichElements is a bitwise combination of esriTopologyElementType values
hitTest
in interface ITopologyGraph
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean enumHitTest(int whichElements, IPoint queryPoint, double searchRadius, IEnumTGHitInfo[] hitInfo) throws IOException, AutomationException
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.
Note: whichElements is a bitwise combination of esriTopologyElement values
enumHitTest
in interface ITopologyGraph
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSelectionCount(int whichElements) throws IOException, AutomationException
getSelectionCount
in interface ITopologyGraph
whichElements
- The whichElements (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean select(int selectHow, ITopologyElement element) throws IOException, AutomationException
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.
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.
select
in interface ITopologyGraph
selectHow
- A com.esri.arcgis.geodatabase.esriTopologySelectionResultEnum constant (in)element
- A reference to a com.esri.arcgis.geodatabase.ITopologyElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumTopologyNode getNodeSelection() throws IOException, AutomationException
This method returns an IEnumTopologyNode enumerator. The enumerator will return references to all of the selected nodes in the topology graph.
getNodeSelection
in interface ITopologyGraph
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumTopologyEdge getEdgeSelection() throws IOException, AutomationException
This method returns an IEnumTopologyEdge enumerator. The enumerator will return references to all of the selected edges in the topology graph.
getEdgeSelection
in interface ITopologyGraph
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope getSelectionExtent(int whichElements, boolean includeAdjacent) throws IOException, AutomationException
getSelectionExtent
in interface ITopologyGraph
whichElements
- The whichElements (in)includeAdjacent
- The includeAdjacent (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void transformSelection(int direction, ITransformation transformation, boolean proportionalStretch) throws IOException, AutomationException
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.
transformSelection
in interface ITopologyGraph
direction
- A com.esri.arcgis.geometry.esriTransformDirection constant (in)transformation
- A reference to a com.esri.arcgis.geometry.ITransformation (in)proportionalStretch
- The proportionalStretch (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void post(IEnvelope[] invalidArea) throws IOException, AutomationException
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.
post
in interface ITopologyGraph
invalidArea
- A reference to a com.esri.arcgis.geometry.IEnvelope (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isPosting() throws IOException, AutomationException
isPosting
in interface ITopologyGraph
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean reshapeEdgeGeometry(ITopologyEdge edge, IPath reshapeGeometry) throws IOException, AutomationException
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.
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.
reshapeEdgeGeometry
in interface ITopologyGraph
edge
- A reference to a com.esri.arcgis.geodatabase.ITopologyEdge (in)reshapeGeometry
- A reference to a com.esri.arcgis.geometry.IPath (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumTopologyParent getSelectionParents() throws IOException, AutomationException
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.
getSelectionParents
in interface ITopologyGraph
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean setParentSelected(IFeatureClass featureClass, int fID, boolean selected) throws IOException, AutomationException
This method allows you to control which features (TopologyParents) are affected by the next topology graph operation.
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).
setParentSelected
in interface ITopologyGraph
featureClass
- A reference to a com.esri.arcgis.geodatabase.IFeatureClass (in)fID
- The fID (in)selected
- The selected (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IGeometry getParentGeometry(IFeatureClass featureClass, int fID) throws IOException, AutomationException
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).
getParentGeometry
in interface ITopologyGraph
featureClass
- A reference to a com.esri.arcgis.geodatabase.IFeatureClass (in)fID
- The fID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IDisplayFeedback getSelectionFeedback(int whichElements, IPoint anchor, boolean proportionalStretch) throws IOException, AutomationException
getSelectionFeedback
in interface ITopologyGraph
whichElements
- The whichElements (in)anchor
- A reference to a com.esri.arcgis.geometry.IPoint (in)proportionalStretch
- The proportionalStretch (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void splitMoveNode(ITopologyNode nodeToSplit, IPoint moveTo, boolean proportionalStretch) throws IOException, AutomationException
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.
splitMoveNode
in interface ITopologyGraph
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IDisplayFeedback getSplitMoveNodeFeedback(ITopologyNode nodeToSplit, boolean proportionalStretch, ISpatialReference outputSR) throws IOException, AutomationException
getSplitMoveNodeFeedback
in interface ITopologyGraph
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void splitEdgeAtPoint(ITopologyEdge edge, IPoint splitPoint, double tolerance, ITopologyEdge[] from, ITopologyNode[] mid, ITopologyEdge[] to) throws IOException, AutomationException
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.
splitEdgeAtPoint
in interface ITopologyGraph
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void splitEdgeAtDistance(ITopologyEdge edge, double distance, boolean asRatio, double tolerance, ITopologyEdge[] from, ITopologyNode[] mid, ITopologyEdge[] to) throws IOException, AutomationException
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.
splitEdgeAtDistance
in interface ITopologyGraph
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setEdgeGeometry(ITopologyEdge edge, IPath geometry) throws IOException, AutomationException
That method allows replacing the geometry of an edge by the input path geometry. The end points of the edge must be respected.
setEdgeGeometry
in interface ITopologyGraph
edge
- A reference to a com.esri.arcgis.geodatabase.ITopologyEdge (in)geometry
- A reference to a com.esri.arcgis.geometry.IPath (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deletePseudoNodesFromSelection() throws IOException, AutomationException
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.
deletePseudoNodesFromSelection
in interface ITopologyGraph
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteEdge(ITopologyEdge edge) throws IOException, AutomationException
deleteEdge
in interface ITopologyGraph
edge
- A reference to a com.esri.arcgis.geodatabase.ITopologyEdge (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void selectByGeometry(int whichElements, int selectHow, IGeometry geometry) throws IOException, AutomationException
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.
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.
selectByGeometry
in interface ITopologyGraph
whichElements
- The whichElements (in)selectHow
- A com.esri.arcgis.geodatabase.esriTopologySelectionResultEnum constant (in)geometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumTopologyNode getParentNodes(IFeatureClass featureClass, int fID) throws IOException, AutomationException
GetParentNodes method returns an enumerator of the TopologyNodes that belong to the specified feature (TopologyParent).
getParentNodes
in interface ITopologyGraph
featureClass
- A reference to a com.esri.arcgis.geodatabase.IFeatureClass (in)fID
- The fID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumTopologyEdge getParentEdges(IFeatureClass featureClass, int fID) throws IOException, AutomationException
GetParentEdges method returns an enumerator of the TopologyEdges that belong to the specified feature (TopologyParent).
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.
getParentEdges
in interface ITopologyGraph
featureClass
- A reference to a com.esri.arcgis.geodatabase.IFeatureClass (in)fID
- The fID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumTopologyEdge getEdges() throws IOException, AutomationException
This method returns an IEnumTopologyEdge enumerator. The enumerator will return references to all of the edges in the topology graph.
getEdges
in interface ITopologyGraph
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumTopologyNode getNodes() throws IOException, AutomationException
This method returns an IEnumTopologyNode enumerator. The enumerator will return references to all the topology nodes in the graph.
getNodes
in interface ITopologyGraph
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isHasElement(ITopologyElement element) throws IOException, AutomationException
isHasElement
in interface ITopologyGraph
element
- A reference to a com.esri.arcgis.geodatabase.ITopologyElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean hitTestSelection(int whichElements, IPoint queryPoint, double searchRadius, IPoint hitPoint, double[] hitDistance, ITopologyElement[] hitElement) throws IOException, AutomationException
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.
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.
hitTestSelection
in interface ITopologyGraph
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isHasPseudoNodes() throws IOException, AutomationException
isHasPseudoNodes
in interface ITopologyGraph2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void postEx(IInvalidArea invalidArea) throws IOException, AutomationException
postEx
in interface ITopologyGraph3
invalidArea
- A reference to a com.esri.arcgis.geodatabase.IInvalidArea (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 |