com.esri.arcgis.geodatabase
Class IGeometricNetworkConnectivity2Proxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geodatabase.IGeometricNetworkConnectivityProxy
          extended by com.esri.arcgis.geodatabase.IGeometricNetworkConnectivity2Proxy
All Implemented Interfaces:
IGeometricNetworkConnectivity, IGeometricNetworkConnectivity2, Externalizable, Serializable

public class IGeometricNetworkConnectivity2Proxy
extends IGeometricNetworkConnectivityProxy
implements IGeometricNetworkConnectivity2, 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.

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, E
 
Constructor Summary
  IGeometricNetworkConnectivity2Proxy()
           
  IGeometricNetworkConnectivity2Proxy(Object obj)
           
protected IGeometricNetworkConnectivity2Proxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void checkAndRepairConnectivity(boolean checkOnly, String logFilePath, ISet[] errorSelectionSets, boolean[] hasInternalInconsistencies, IRepairConnectivityProgress repairConnectivityProgress)
          Checks and optionally repairs connectivity.
 void readExternal(ObjectInput in)
           
 void rebuildConnectivity2(IEnvelope incrementalRebuildArea)
          Incrementally rebuilds connectivity for features within and intersecting the specified envelope.
 void removeListener(String iidStr, Object theListener)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class com.esri.arcgis.geodatabase.IGeometricNetworkConnectivityProxy
rebuildConnectivity
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, queryInterface, release, setNativeMode, setPropertyByName, toString, vtblInvoke
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.geodatabase.IGeometricNetworkConnectivity
rebuildConnectivity
 

Constructor Detail

IGeometricNetworkConnectivity2Proxy

public IGeometricNetworkConnectivity2Proxy()

IGeometricNetworkConnectivity2Proxy

public IGeometricNetworkConnectivity2Proxy(Object obj)
                                    throws IOException
Throws:
IOException

IGeometricNetworkConnectivity2Proxy

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

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class IGeometricNetworkConnectivityProxy
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class IGeometricNetworkConnectivityProxy
Throws:
IOException

checkAndRepairConnectivity

public 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

Specified by:
checkAndRepairConnectivity in interface IGeometricNetworkConnectivity2
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

public 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

Specified by:
rebuildConnectivity2 in interface IGeometricNetworkConnectivity2
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)

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class IGeometricNetworkConnectivityProxy
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class IGeometricNetworkConnectivityProxy
Throws:
IOException
ClassNotFoundException