com.esri.arcgis.geodatabase
Interface INetwork

All Superinterfaces:
Serializable
All Known Subinterfaces:
IStreetNetwork, IUtilityNetwork, IUtilityNetwork2, IUtilityNetworkGEN
All Known Implementing Classes:
INetworkProxy, IStreetNetworkProxy, IUtilityNetwork2Proxy, IUtilityNetworkGENProxy, IUtilityNetworkProxy, StreetNetwork, UtilityNetwork

public interface INetwork
extends Serializable

Provides access to members that give general information about the network and its elements.

Remarks

To obtain a reference to the logical network of a geometric network you first need to obtain a reference to the geometric network. An example of this can be found in the help for IGeometricNetwork.

Once you have a reference to the geometric network you can obtain a reference to the logical network using the IGeometricNetwork::Network property.

The INetwork interface is on the Network abstract class, which contains other interfaces for use with logical networks:

INetworkUpdate - Used for starting updating sessions in the logical network.
INetElements - Used for getting element ID's (EID's) and verify valid elements.
INetSchema - Used for getting element classes and in a logical network.
INetSchemaEdit - Used for editing the schema of the logical network such as adding weights.
INetAttributes - Used for getting weight values and enabled/disabled state of elements.
INetAttributesEdit - Used for changing weight values and disabled/enabling elements.
INetTopology - Used for seeing what elements are connect to another element.
INetTopologyEdit - Used for adding and deleting elements from the logical network.

When To Use

Use the INetwork interface when you want to query the network for general information such as the status of the network or the number of edges in your network. You can also use this interface to create a forwardstar object, which is used for traversing the network.

Product Availability

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

See Also:
INetworkUpdate, IForwardStar, IGraph, INetworkClass.getNetworkAncillaryRole(), INetworkWorkspace, INetworkClass.getGeometricNetwork(), INetworkClass.getFieldToWeightMapping(int), IUtilityNetwork, INetwork

Method Summary
 IForwardStar createForwardStar(boolean honorState, INetWeight junctionWeight, INetWeight fromToEdgeWeight, INetWeight toFromEdgeWeight, INetWeight turnWeight)
          Creates a forward star cursor on the network index.
 IEnumNetEID createNetBrowser(int elementType)
          Creates a network index element browser.
 int getEdgeCount()
          Number of edges in the network.
 int getJunctionCount()
          Number of junctions in the network.
 int getMaxDegree()
          Maximum degree of a junction.
 int getMaxTurn()
          Maximum number of turns associated with a junction.
 int getStatus()
          Status of the network.
 int getTurnCount()
          Number of turns in the network.
 

Method Detail

getStatus

int getStatus()
              throws IOException,
                     AutomationException
Status of the network.

Remarks

The status of a network can be:

esriNSInvalidConnection
esriNSNetworkAlreadyExist
esriNSReadOnlyNetwork
esriNSCannotOpenTables
esriNSCannotCreateTables
esriNSInvalidElementClasses
esriNSInvalidWeights
esriNSUnknownStatus
esriNSValidNetwork

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.geodatabase.esriNetworkStatus constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getJunctionCount

int getJunctionCount()
                     throws IOException,
                            AutomationException
Number of junctions in the network.

Remarks

JunctionCount returns a count of all the junctions in the network.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The junctionCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEdgeCount

int getEdgeCount()
                 throws IOException,
                        AutomationException
Number of edges in the network.

Remarks

EdgeCount returns a count of all the edges within the network.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The edgeCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTurnCount

int getTurnCount()
                 throws IOException,
                        AutomationException
Number of turns in the network.

Remarks

TurnCount returns a count of all the turns within a StreetNetwork. For a UtilityNetwork, TurnCount will return 0.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The turnCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMaxDegree

int getMaxDegree()
                 throws IOException,
                        AutomationException
Maximum degree of a junction.

Remarks

The MaxDegree is the maximum number of edges connected to any given junction in the network. This property can be used to determine if there are incorrect connections within the network. For instance, in a Gas Network it is unlikely that there would ever be more than 4 edges attached to a junction. If MaxDegree returned a number greater than 4, it would indicate a problem in the network.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The maxDegree
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMaxTurn

int getMaxTurn()
               throws IOException,
                      AutomationException
Maximum number of turns associated with a junction.

Remarks

MaxTurn returns the maximum number of turns assigned to any given junction within a StreetNetwork. For a UtilityNetwork, MaxTurn will always return 0.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The maxTurn
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createForwardStar

IForwardStar createForwardStar(boolean honorState,
                               INetWeight junctionWeight,
                               INetWeight fromToEdgeWeight,
                               INetWeight toFromEdgeWeight,
                               INetWeight turnWeight)
                               throws IOException,
                                      AutomationException
Creates a forward star cursor on the network index.

Remarks

CreateForwardStar generates an IForwardStar object that can be used for stepping through the network. The input parameters for the method are as follows:

HonorState refers to elements in your network that are enabled/disabled. If you set HonorState to True then the ForwardStar will only return elements that are not disabled. If you specify False then any element that is connected to the element you are accessing will return a ForwardStar.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
honorState - The honorState (in)
junctionWeight - A reference to a com.esri.arcgis.geodatabase.INetWeight (in)
fromToEdgeWeight - A reference to a com.esri.arcgis.geodatabase.INetWeight (in)
toFromEdgeWeight - A reference to a com.esri.arcgis.geodatabase.INetWeight (in)
turnWeight - A reference to a com.esri.arcgis.geodatabase.INetWeight (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IForwardStar
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INetwork.createForwardStar(boolean, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight), IForwardStar.queryAdjacentEdge(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunction(int, int[], Object[]), IForwardStar.getNetwork(), IForwardStar.findAdjacent(int, int, int[]), IForwardStar.queryAtTurns(int, int[], Object[]), IForwardStar.queryAdjacentEdges(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunctions(int, int[], Object[]), IForwardStar.queryAtTurn(int, int[], Object[])

createNetBrowser

IEnumNetEID createNetBrowser(int elementType)
                             throws IOException,
                                    AutomationException
Creates a network index element browser.

Remarks

CreateNetBrowser returns a reference to an IEnumNetEID interface. This particular enumeration represents all of the elements within the network. Use this method when you want to access all of the individual elements of the network for setting the enabled/disabled property or some other similar purpose.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
elementType - A com.esri.arcgis.geodatabase.esriElementType constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumNetEID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.