ITopologyGraph Interface

Provides access to members that control the topology graph.

Description

Each geodatabase topology has one associated topology graph. The TopologyGraph is an in-memory planar representation of the geometries in the feature classes participating in the topology.

Members

Name Description
Method Build Creates topo elements from all topology feature classes covering the specified map extent.
Read-only property BuildExtent The extent used to build the graph.
Method BuildFromPolygon Creates topo elements from all topology feature classes intersecting the specified polygon. The topology graph takes ownership of the input polygon.
Read-only property BuildPolygonExtent The polygon used to determine the contents of the topology graph. The topology graph maintains ownership of this reference.
Method DeleteEdge Deletes the specified edge from its containing topology graph.
Method DeletePseudoNodesFromSelection Removes pseudo-nodes by combining edges incident on such nodes. Edges and nodes in the current selection are considered.
Method DetermineNodeDegree Nodes located outside a polygonal build extent do not have a known degree (valence). Apply this method before using the Degree or IsDegreeKnown properties of a topology node from this graph.
Read-only property Edges The enumerator that provides access to all the edges.
Read-only property EdgeSelection The enumerator for the selected edges of the topology.
Method EnumHitTest Locates all elements of the graph within searchRadius units of the query point; whichElements is a bitwise combination of esriTopologyElement values.
Read-only property Extent The current extent of all topological elements in the graph. This may be different than the extent used to build the graph.
Method GetParentEdges Returns the set of edges corresponding to the specified polyline or polygon feature.
Method GetParentGeometry Creates a geometry corresponding to the current set of edges/nodes owned by the specified parent.
Method GetParentNodes Returns the set of nodes corresponding to the specified point or multipoint feature.
Read-only property HasElement Indicates if the topology graph contains the specified element.
Read-only property HasPseudoNodes Indicates if the topology graph contains pseudo nodes.
Method HitTest 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.
Method HitTestSelection 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.
Read-only property IsPosting Indicates if the topology graph is posting.
Method MergeSelectedEdges Merge a connected sequence of selected edges that has the same feature parent set.
Read-only property Nodes The enumerator that provides access to all the nodes.
Read-only property NodeSelection The enumerator for the selected nodes of the topology.
Method Post Posts changes to topology elements back to their originating features. Must be used within an edit session and edit operation.
Method ReshapeEdgeGeometry Reshapes (and possibly reinterpolates) the geometry of the specified edge.
Method Select Adds the specified element to the selected subset of the graph.
Method SelectByGeometry Selects nodes and/or edges that intersect the specified geometry; whichElements is a bitwise combination of esriTopologyElement values.
Read-only property SelectionCount The count of selected elements of the specified types; whichElements is a bitwise combination of esriTopologyElement values.
Read-only property SelectionExtent 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.
Read-only property SelectionParents The feature class and oid of each parent of the selected set of elements.
Method SetEdgeGeometry Assigns the path geometry to the specified edge. Reinterpolatex vertex attributes for the edge if any exist.
Method SetEmpty Removes all topological elements from the graph. Any client-side references to topo elements that came from this graph should be released.
Method SetParentSelected Selects parents of edges. SUbsequent edits to those edges will only be posted back to selected parents.
Method SetSelectionEmpty Clears the specified selection set: whichType is a bitwise combination of esriTopologyNode, esriTopologyEdge.
Method SplitEdgeAtDistance 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.
Method SplitEdgeAtPoint 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.
Method SplitMoveNode 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.
Method TransformSelection Applies the specified transformation to the selected elements of the graph.

ITopologyGraph.Build Method

Creates topo elements from all topology feature classes covering the specified map extent.

Public Sub Build ( _
    ByVal Extent As IEnvelope, _
    ByVal preserveSelection As Boolean _
)
public void Build (
    IEnvelope Extent,
    bool preserveSelection
);

Description

The ITopologyGraph::Build method is used to construct the TopologyElements(TopologyNodes and TopologyEdges). Once "Build" is performed, the topology elements are cached in the memory and ready to use.

bool BuildTopoGraph(IGeometry buildGeom, ITopologyGraph topoGraph, bool keepSelection)

{

  if (buildGeom == null || topoGraph == null)

    return false;

  switch (buildGeom.GeometryType)

  {

    case esriGeometryType.esriGeometryPolygon:

      {

        topoGraph.BuildFromPolygon((IPolygon)buildGeom, keepSelection);

        return true;

      }

    case esriGeometryType.esriGeometryEnvelope:

      {

        topoGraph.Build((IEnvelope)buildGeom, keepSelection);

        return true;

      }

    default:

      return false;

  }

}
Private Function BuildTopoGraph(ByVal buildGeom As IGeometry, ByVal topoGraph As ITopologyGraph, ByVal keepSelection As Boolean) As Boolean

    If buildGeom Is Nothing OrElse topoGraph Is Nothing Then

        Return False

    End If

    Select Case buildGeom.GeometryType

        Case esriGeometryType.esriGeometryPolygon

            topoGraph.BuildFromPolygon(CType(buildGeom, IPolygon), keepSelection)

            Return True

        Case esriGeometryType.esriGeometryEnvelope

            topoGraph.Build(CType(buildGeom, IEnvelope), keepSelection)

            Return True

        Case Else

            Return False

    End Select

End Function

ITopologyGraph.BuildExtent Property

The extent used to build the graph.

Public ReadOnly Property BuildExtent As IEnvelope
public IEnvelope BuildExtent {get;}

Description

The ITopologyGraph::BuildExtent property returns an envelope object corresponding to the extent where the TopologyGraph has been built. If the TopologyGraph is failed to create, the envelope will be empty.

ITopologyGraph.BuildFromPolygon Method

Creates topo elements from all topology feature classes intersecting the specified polygon. The topology graph takes ownership of the input polygon.

Public Sub BuildFromPolygon ( _
    ByVal Extent As IPolygon, _
    ByVal preserveSelection As Boolean _
)
public void BuildFromPolygon (
    IPolygon Extent,
    bool preserveSelection
);

Remarks

The ITopologyGraph::BuildFromPolygon method is very similar to ITopologyGraph::Build, except the extent of the build isn't restricted to a rectangular envelope; any polygon can be used to define the build area.

bool BuildTopoGraph(IGeometry buildGeom, ITopologyGraph topoGraph, bool

  keepSelection)

{

  if (buildGeom == null || topoGraph == null)

    return false;

  switch (buildGeom.GeometryType)

  {

    case esriGeometryType.esriGeometryPolygon:

      {

        ITopologyGraph4 topoGraph4 = topoGraph as ITopologyGraph4;

        topoGraph4.BuildFromPolygon((IPolygon)buildGeom, keepSelection);

        return true;

      }

    case esriGeometryType.esriGeometryEnvelope:

      {

        topoGraph.Build((IEnvelope)buildGeom, keepSelection);

        return true;

      }

    default:

      return false;

  }

}
Private Function BuildTopoGraph(ByVal buildGeom As IGeometry, ByVal topoGraph As ITopologyGraph, ByVal keepSelection As Boolean) As Boolean

    If buildGeom Is Nothing OrElse topoGraph Is Nothing Then

        Return False

    End If

    Select Case buildGeom.GeometryType

        Case esriGeometryType.esriGeometryPolygon

            Dim topoGraph4 As ITopologyGraph4 = TryCast(topoGraph, ITopologyGraph4)

            topoGraph4.BuildFromPolygon(CType(buildGeom, IPolygon), keepSelection)

            Return True

        Case esriGeometryType.esriGeometryEnvelope

            topoGraph.Build(CType(buildGeom, IEnvelope), keepSelection)

            Return True

        Case Else

            Return False

    End Select

End Function

ITopologyGraph.BuildPolygonExtent Property

The polygon used to determine the contents of the topology graph. The topology graph maintains ownership of this reference.

Public ReadOnly Property BuildPolygonExtent As IPolygon
public IPolygon BuildPolygonExtent {get;}

ITopologyGraph.DeleteEdge Method

Deletes the specified edge from its containing topology graph.

Public Sub DeleteEdge ( _
    ByVal Edge As ITopologyEdge _
)
public void DeleteEdge (
    ITopologyEdge Edge
);

ITopologyGraph.DeletePseudoNodesFromSelection Method

Removes pseudo-nodes by combining edges incident on such nodes. Edges and nodes in the current selection are considered.

Public Sub DeletePseudoNodesFromSelection ( _
)
public void DeletePseudoNodesFromSelection (
);

Description

The ITopologyGraph::DeletePseudoNodesFromSelection method allows merging two connected TopologyEdges if a constructed TopologyNode(pseudo-node) separates them. Here, a constructed node is a TopologyNode created using ITopologyGraph::SplitEdgeAtDistanc or ITopologyGraph::SplitEdgeAtPoint methods. The TopologyEdge separated by regular TopologyNode will not get merged.

ITopologyGraph.DetermineNodeDegree Method

Nodes located outside a polygonal build extent do not have a known degree (valence). Apply this method before using the Degree or IsDegreeKnown properties of a topology node from this graph.

Public Sub DetermineNodeDegree ( _
)
public void DetermineNodeDegree (
);

ITopologyGraph.Edges Property

The enumerator that provides access to all the edges.

Public ReadOnly Property Edges As IEnumTopologyEdge
public IEnumTopologyEdge Edges {get;}

Description

The ITopologyGraph::Edges property returns an IEnumTopologyEdge enumerator. The enumerator will return references to all of the edges in the topology graph.

ITopologyGraph.EdgeSelection Property

The enumerator for the selected edges of the topology.

Public ReadOnly Property EdgeSelection As IEnumTopologyEdge
public IEnumTopologyEdge EdgeSelection {get;}

Description

The ITopologyGraph::EdgeSelection property returns an IEnumTopologyEdge enumerator. The enumerator will return references to all of the selected edges in the topology graph.

ITopologyGraph.EnumHitTest Method

Locates all elements of the graph within searchRadius units of the query point; whichElements is a bitwise combination of esriTopologyElement values.

Public Function EnumHitTest ( _
    ByVal whichElements As Integer, _
    ByVal QueryPoint As IPoint, _
    ByVal searchRadius As Double, _
    ByRef hitInfo As IEnumTGHitInfo _
) As Boolean
public bool EnumHitTest (
    int whichElements,
    IPoint QueryPoint,
    double searchRadius,
    ref IEnumTGHitInfo hitInfo
);

Description

The ITopologyGraph::EnumHitTest method allows retrieving 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

ITopologyGraph.Extent Property

The current extent of all topological elements in the graph. This may be different than the extent used to build the graph.

Public ReadOnly Property Extent As IEnvelope
public IEnvelope Extent {get;}

Description

The ITopologyGraph::Extent property returns an envelope object corresponding to the union of all the TopologyElements extents.

ITopologyGraph.GetParentEdges Method

Returns the set of edges corresponding to the specified polyline or polygon feature.

Public Function GetParentEdges ( _
    ByVal FeatureClass As IFeatureClass, _
    ByVal OID As Long _
) As IEnumTopologyEdge
public IEnumTopologyEdge GetParentEdges (
    IFeatureClass FeatureClass,
    long OID
);

Description

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

Remarks

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

ITopologyGraph.GetParentGeometry Method

Creates a geometry corresponding to the current set of edges/nodes owned by the specified parent.

Public Function GetParentGeometry ( _
    ByVal FeatureClass As IFeatureClass, _
    ByVal OID As Long _
) As IGeometry
public IGeometry GetParentGeometry (
    IFeatureClass FeatureClass,
    long OID
);

Description

The ITopologyGraph::GetParentGeometry method 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 a given parent. This means that if vertices are introduced in the TopologyGraph with non-explicit intersections (intersections not initially present in the parents), those intersections will be reflected by the insertion of new vertices on the output geometry (See picture below).

ITopologyGraph.GetParentNodes Method

Returns the set of nodes corresponding to the specified point or multipoint feature.

Public Function GetParentNodes ( _
    ByVal FeatureClass As IFeatureClass, _
    ByVal OID As Long _
) As IEnumTopologyNode
public IEnumTopologyNode GetParentNodes (
    IFeatureClass FeatureClass,
    long OID
);

Description

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

ITopologyGraph.HasElement Property

Indicates if the topology graph contains the specified element.

Public Function get_HasElement ( _
    ByVal Element As ITopologyElement _
) As Boolean
public bool get_HasElement (
    ITopologyElement Element
);

Description

The ITopologyGraph::HasElement property indicates whether or not a TopologyElement(TopologyNode or TopologyEdge) is part of the TopologyGraph.

ITopologyGraph.HasPseudoNodes Property

Indicates if the topology graph contains pseudo nodes.

Public ReadOnly Property HasPseudoNodes As Boolean
public bool HasPseudoNodes {get;}

ITopologyGraph.HitTest Method

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.

Public Function HitTest ( _
    ByVal whichElements As Integer, _
    ByVal QueryPoint As IPoint, _
    ByVal searchRadius As Double, _
    ByVal hitPoint As IPoint, _
    ByRef hitDistance As Double, _
    ByRef hitElement As ITopologyElement _
) As Boolean
public bool HitTest (
    int whichElements,
    IPoint QueryPoint,
    double searchRadius,
    IPoint hitPoint,
    ref double hitDistance,
    ref ITopologyElement hitElement
);

Description

The ITopologyGraph::HitTest method allows retrieving the nearest TopologyElement (TopologyNode or TopologyEdge) located within a distance from an input point. This method is 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. If they are not in the same distance units, no conversion will be performed.

Remarks

Note: whichElements is a bitwise combination of esriTopologyElementType values

ITopologyGraph.HitTestSelection Method

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.

Public Function HitTestSelection ( _
    ByVal whichElements As Integer, _
    ByVal QueryPoint As IPoint, _
    ByVal searchRadius As Double, _
    ByVal hitPoint As IPoint, _
    ByRef hitDistance As Double, _
    ByRef hitElement As ITopologyElement _
) As Boolean
public bool HitTestSelection (
    int whichElements,
    IPoint QueryPoint,
    double searchRadius,
    IPoint hitPoint,
    ref double hitDistance,
    ref ITopologyElement hitElement
);

Description

The ITopologyGraph::HitTestSelection method allows retrieving 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

Note: whichElements is a bitwise combination of esriTopologyElement values.

ITopologyGraph.IsPosting Property

Indicates if the topology graph is posting.

Public ReadOnly Property IsPosting As Boolean
public bool IsPosting {get;}

ITopologyGraph.MergeSelectedEdges Method

Merge a connected sequence of selected edges that has the same feature parent set.

Public Sub MergeSelectedEdges ( _
)
public void MergeSelectedEdges (
);

ITopologyGraph.Nodes Property

The enumerator that provides access to all the nodes.

Public ReadOnly Property Nodes As IEnumTopologyNode
public IEnumTopologyNode Nodes {get;}

Description

The ITopologyGraph::Nodes property returns an IEnumTopologyNode enumerator. The enumerator will return references to all the topology nodes in the graph.

ITopologyGraph.NodeSelection Property

The enumerator for the selected nodes of the topology.

Public ReadOnly Property NodeSelection As IEnumTopologyNode
public IEnumTopologyNode NodeSelection {get;}

Description

The ITopologyGraph::NodeSelection property returns an IEnumTopologyNode enumerator. The enumerator will return references to all of the selected nodes in the topology graph.

ITopologyGraph.Post Method

Posts changes to topology elements back to their originating features. Must be used within an edit session and edit operation.

Public Sub Post ( _
    ByRef InvalidArea As IEnvelope _
)
public void Post (
    ref IEnvelope InvalidArea
);

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.

ITopologyGraph.ReshapeEdgeGeometry Method

Reshapes (and possibly reinterpolates) the geometry of the specified edge.

Public Function ReshapeEdgeGeometry ( _
    ByVal Edge As ITopologyEdge, _
    ByVal reshapeGeometry As IPath _
) As Boolean
public bool ReshapeEdgeGeometry (
    ITopologyEdge Edge,
    IPath reshapeGeometry
);

Description

The ReshapeEdgeGeometry 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 a PointIDAware geometry, newly created vertices get IDs values of 0.

Remarks

Normally, this method can not reposition the From and To nodes of the edge. However, an exception is made when the edge is closed and doesn't interact with other edges from its From/To node. In that case, edge reshaping is done by delegating to IRing::Reshape rather than IPolyline::Reshape.

ITopologyGraph.Select Method

Adds the specified element to the selected subset of the graph.

Public Function Select ( _
    ByVal selectHow As esriTopologySelectionResultEnum, _
    ByVal Element As ITopologyElement _
) As Boolean
public bool Select (
    esriTopologySelectionResultEnum selectHow,
    ITopologyElement Element
);

Description

The Select method allows modifying the current set of selected TopologyElement 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.

ITopologyGraph.SelectByGeometry Method

Selects nodes and/or edges that intersect the specified geometry; whichElements is a bitwise combination of esriTopologyElement values.

Public Sub SelectByGeometry ( _
    ByVal whichElements As Integer, _
    ByVal selectHow As esriTopologySelectionResultEnum, _
    ByVal Geometry As IGeometry _
)
public void SelectByGeometry (
    int whichElements,
    esriTopologySelectionResultEnum selectHow,
    IGeometry Geometry
);

Description

The SelectByGeometry method allows modifying the current set of selected topology elements of the TopologyGraph using an input geometry. The esriTopologySelectionResultEnum parameter determines the selection behavior.

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

// For example, to move a node the selection anchor can be set to the location of the node.

ESRI.ArcGIS.Display.IAnchorPoint anchorPoint = editor.SelectionAnchor;

anchorPoint.MoveTo(topologyNode.Geometry, activeDisplay);

ITopologyGraph.SelectionCount Property

The count of selected elements of the specified types; whichElements is a bitwise combination of esriTopologyElement values.

Public Function get_SelectionCount ( _
    ByVal whichElements As Integer _
) As Integer
public int get_SelectionCount (
    int whichElements
);

Description

The SelectionCount method returns the number of selected topology elements (TopologyNode and/or TopologyEdge) in the TopologyGraph.

Remarks

whichElements is a bitwise combination of esriTopologyElement values.

ITopologyGraph.SelectionExtent Property

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.

Public Function get_SelectionExtent ( _
    ByVal whichElements As Integer, _
    ByVal includeAdjacent As Boolean _
) As IEnvelope
public IEnvelope get_SelectionExtent (
    int whichElements,
    bool includeAdjacent
);

Remarks

whichElements is a bitwise combination of esriTopologyElement values.

ITopologyGraph.SelectionParents Property

The feature class and oid of each parent of the selected set of elements.

Public ReadOnly Property SelectionParents As IEnumTopologyParent
public IEnumTopologyParent SelectionParents {get;}

Description

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

ITopologyGraph.SetEdgeGeometry Method

Assigns the path geometry to the specified edge. Reinterpolatex vertex attributes for the edge if any exist.

Public Sub SetEdgeGeometry ( _
    ByVal Edge As ITopologyEdge, _
    ByVal Geometry As IPath _
)
public void SetEdgeGeometry (
    ITopologyEdge Edge,
    IPath Geometry
);

Description

The SetEdgeGeometry allows replacing the geometry of an edge with the input path geometry. The endpoints of the edge must be respected.

ITopologyGraph.SetEmpty Method

Removes all topological elements from the graph. Any client-side references to topo elements that came from this graph should be released.

Public Sub SetEmpty ( _
)
public void SetEmpty (
);

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.

ITopologyGraph.SetParentSelected Method

Selects parents of edges. SUbsequent edits to those edges will only be posted back to selected parents.

Public Function SetParentSelected ( _
    ByVal FeatureClass As IFeatureClass, _
    ByVal OID As Long, _
    ByVal selected As Boolean _
) As Boolean
public bool SetParentSelected (
    IFeatureClass FeatureClass,
    long OID,
    bool selected
);

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 of the topology selection. By default, for a given topology element, all of its parents are selected. However, it is possible to unselect one or more parents explicitly, 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 the default state (all parents selected).

ITopologyGraph.SetSelectionEmpty Method

Clears the specified selection set: whichType is a bitwise combination of esriTopologyNode, esriTopologyEdge.

Public Sub SetSelectionEmpty ( _
    ByVal whichType As Integer _
)
public void SetSelectionEmpty (
    int whichType
);

ITopologyGraph.SplitEdgeAtDistance Method

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.

Public Sub SplitEdgeAtDistance ( _
    ByVal Edge As ITopologyEdge, _
    ByVal distance As Double, _
    ByVal asRatio As Boolean, _
    ByVal tolerance As Double, _
    ByRef from As ITopologyEdge, _
    ByRef mid As ITopologyNode, _
    ByRef to As ITopologyEdge _
)
public void SplitEdgeAtDistance (
    ITopologyEdge Edge,
    double distance,
    bool asRatio,
    double tolerance,
    ref ITopologyEdge from,
    ref ITopologyNode mid,
    ref ITopologyEdge to
);

Description

The SplitEdgeAtDistance 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 a TopologyGraph operation modifies the TopologyNode.

ITopologyGraph.SplitEdgeAtPoint Method

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.

Public Sub SplitEdgeAtPoint ( _
    ByVal Edge As ITopologyEdge, _
    ByVal splitPoint As IPoint, _
    ByVal tolerance As Double, _
    ByRef from As ITopologyEdge, _
    ByRef mid As ITopologyNode, _
    ByRef to As ITopologyEdge _
)
public void SplitEdgeAtPoint (
    ITopologyEdge Edge,
    IPoint splitPoint,
    double tolerance,
    ref ITopologyEdge from,
    ref ITopologyNode mid,
    ref ITopologyEdge to
);

Description

The SplitEdgeAtPoint 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 a TopologyGraph operation modifies the TopologyNode.

ITopologyGraph.SplitMoveNode Method

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.

Public Sub SplitMoveNode ( _
    ByVal nodeToSplit As ITopologyNode, _
    ByVal moveTo As IPoint, _
    ByVal proportionalStretch As Boolean _
)
public void SplitMoveNode (
    ITopologyNode nodeToSplit,
    IPoint moveTo,
    bool proportionalStretch
);

Description

The 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 on the geometry type of the features modified (Polyline or Polygon). As with any other operations on the TopologyGraph the parent selection will determine which parent is affected by this operation (See ITopologyGraph::SetParentSelected topic for details on topology selection vs parent selection)

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

ITopologyGraph.TransformSelection Method

Applies the specified transformation to the selected elements of the graph.

Public Sub TransformSelection ( _
    ByVal Direction As esriTransformDirection, _
    ByVal transformation As ITransformation, _
    ByVal proportionalStretch As Boolean _
)
public void TransformSelection (
    esriTransformDirection Direction,
    ITransformation transformation,
    bool proportionalStretch
);

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.

Classes that implement ITopologyGraph

Classes Description

Remarks

Use the ITopologyGraph::Build method to construct the topology elements (topology nodes and topology edges). After a TopologyGraph is built, the spatial relationships between features are discovered, analyzed, and established to form an in-memory graph of topological elements. The TopologyGraph should create before accessing properties or calling other methods on this interface.

void OpenTopologyGraph(ITopology topology, IGeoDataset geoDataset)

{

  //Open the topology graph.

  ITopologyGraph topologyGraph = topology.Cache;



  //Check to see if an existing graph is built for the area of interest.

  IEnvelope existingGraphEnv = topologyGraph.BuildExtent;



  //Build the cache using the geodatasets extent  

  topologyGraph.Build(geoDataset.Extent, false);



  // Get edges

  IEnumTopologyEdge enumEdges = topologyGraph.Edges;



  // Get Nodes

  IEnumTopologyNode enumNodes = topologyGraph.Nodes;

}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.