com.esri.arcgis.geodatabase
Interface IGeometricNetworkConnectivity2

All Superinterfaces:
IGeometricNetworkConnectivity, Serializable
All Known Implementing Classes:
GeometricNetwork, IGeometricNetworkConnectivity2Proxy

public interface IGeometricNetworkConnectivity2
extends IGeometricNetworkConnectivity, Serializable

Provides access to members that check and repair and rebuild connectivity.

Remarks

The IGeometricNetworkConnectivity2 interface provides access to the methods that can be used to verify and rebuild the inconsistent connectivity of network features. These methods can be computationally expensive and should only be run when the networik is suspected of having inconsistent connectivity.

When To Use

Use the IGeometricNetworkConnectivity2 interface in place of the IGeometricNetworkConnectivity interface when you need to repair the connectivity of network features.

The two methods available from IGeometricNetworkConnectivity2 should be used under different circumstance.

RebuildConnectivity2 should be used when:

CheckandRepairConnectivity should be used when:

Product Availability

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


Method Summary
 void checkAndRepairConnectivity(boolean checkOnly, String logFilePath, ISet[] errorSelectionSets, boolean[] hasInternalInconsistencies, IRepairConnectivityProgress repairConnectivityProgress)
          Checks and optionally repairs connectivity.
 void rebuildConnectivity2(IEnvelope incrementalRebuildArea)
          Incrementally rebuilds connectivity for features within and intersecting the specified envelope.
 
Methods inherited from interface com.esri.arcgis.geodatabase.IGeometricNetworkConnectivity
rebuildConnectivity
 

Method Detail

checkAndRepairConnectivity

void checkAndRepairConnectivity(boolean checkOnly,
                                String logFilePath,
                                ISet[] errorSelectionSets,
                                boolean[] hasInternalInconsistencies,
                                IRepairConnectivityProgress repairConnectivityProgress)
                                throws IOException,
                                       AutomationException
Checks and optionally repairs connectivity.

Description

The CheckandRepairConnectivity method will check for and optionally repair an assortment of connectivity errors within a geometric network. In contrast to RebuildConnectivity2, CheckandRepairConnectivity will only repair those features who have been identified as having inconsistent connectivity.

For a geometric network in a Personal or File Geodatabase, CheckandRepairConnectivity will work against the entire geometric network. For geometric networks in an ArcSDE Geodatabase, CheckandRepairConnectivity will work against the geometric network connectivity within the version currently being edited. Types of network inconsistencies that CheckandRepairConnectivity will discover and repair include:

- network features missing element IDs
- network features with more than 1 element ID
- an element ID that references a deleted feature
- inconsistent connectivity

CheckandRepairConnectivity takes five mandatory arguments. The first, checkOnly is a boolean that specifies whether errors will be repaired or not. A value of False designates that errors are corrected. If True is specified CheckandRepairConnectivity will run in Check Only mode in which errors will be discovered but not repaired.

The second argument dictates whether CheckandRepairConnectivity will produce a log file listing the feature class and Object ID of all the network errors that were discovered and repaired. For a geometric network called, 'MyNetwork' and a supplied path of 'D:\Temp\Logifles\' the logfilePath arguement would appear as; "D:\Temp\Logifles\MyNetwork.txt". To run CheckandRepairConnectivity with no log file, specify an empty string for the logfilePath argument.

The third argument is a Set object that contains references to repaired features. errorSelectionSets can be used to determine if any features were found to have inconsistencies and repaired. The set object will contain a reference to each feature class which contains repaired features.

The fourth argument is a boolean which returns the state of the logical network. If the logical network contains internal inconsistencies, that is, inconsistencies which do not reference existing features within the geometric network, hasInternalInconsistencies will return True, otherwise, it will return False.

The fifth argumnt is an IRepairConnectivityProgress object that is used to retrieve any warnings generated by CheckandRepairConnectivity. During the process of repairing network connectivity, CheckandRepairConnectivity may perform actions that discover network features that require further review. If any warnings are encountered during repair of the network, they can be accessed using IRepairConnectivityProgress::Warnings. The type of warning, feature class and Object ID of the feature is included. Types of warnings include:

- creation of new orphan junctions
- invalid geometries
- coincident junctions
- coincident vertices

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
checkOnly - The checkOnly (in)
logFilePath - The logFilePath (in)
errorSelectionSets - A reference to a com.esri.arcgis.system.ISet (out: use single element array)
hasInternalInconsistencies - The hasInternalInconsistencies (out: use single element array)
repairConnectivityProgress - A reference to a com.esri.arcgis.geodatabase.IRepairConnectivityProgress (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

rebuildConnectivity2

void rebuildConnectivity2(IEnvelope incrementalRebuildArea)
                          throws IOException,
                                 AutomationException
Incrementally rebuilds connectivity for features within and intersecting the specified envelope. Version 2.

Description

If network connectivity errors are found within the geometric network, they can generally be corrected through the use of the RebuildConnectivity2 method. This method takes an envelope which should contain the network features for which connectivity will be rebuilt. The RebuildConnectivity2 method does not check for invalid connectivity, it will remove and then rebuild the connectivity of any feature contained within or intersecting the specified envelope.

RebuildConnectivity2 should only be used to rebuild the connectivity of features whose invalid geometry has been repaired or to rebuild inconsistent connectivity on features. RebuildConnectivity2 is not as computationally expensive as IGeometricNetworkConnectivity::RebuildConnectivity and as such, can be used on a larger number of network features. However, the size of the envelope supplied to RebuildConnectivity2 should still be taken into consideration. It is generally faster to call RebuildConnectivity2 on small individual areas rather than one large area that encompasses the smaller areas.

RebuildConnectivity should not be used to establish connectivity between network features. To establish connectivity, use INetworkFeature::Connect.

Remarks

If RebuildConnectivity2 encounters an edge feature that is missing a junction on an endpoint, it will insert a new orphan junction at the endpoint of the edge feature.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
incrementalRebuildArea - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IGeometricNetworkConnectivity.rebuildConnectivity(com.esri.arcgis.geometry.IEnvelope), IGeometricNetworkConnectivity2.rebuildConnectivity2(com.esri.arcgis.geometry.IEnvelope)