com.esri.arcgis.networkanalysis
Interface INetworkLoader

All Superinterfaces:
Serializable
All Known Subinterfaces:
INetworkLoader2
All Known Implementing Classes:
NetworkLoader

public interface INetworkLoader
extends Serializable

Provides access to members used to create a new geometric network.

Superseded By

INetworkLoader2

Remarks

The INetworkLoader and INetworkLoader2 interfaces provide parameters for building your new geometric network. For more information on how to use these interfaces together in the NetworkLoader object, see the help for the NetworkLoader object.

When To Use

Use the INetworkLoader and INetworkLoader2 interfaces when you want to create a new geometric network.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
INetworkLoader, INetworkLoaderProgress, INetworkLoaderProps

Method Summary
 void addFeatureClass(String featureClassName, int newFeatureType, IUID newClsID, boolean canChangeGeometry)
          Adds a feature class to the new geometric network.
 void addWeight(String networkWeightName, int weightType, int bitGateSize)
          Adds a weight to the new geometric network.
 void addWeightAssociation(String networkWeightName, String featureClassName, String fieldName)
          Adds an association between a network weight and a feature class attribute.
 void loadNetwork()
          Creates the new geometric network inside the feature dataset.
 void putAncillaryRole(String featureClassName, int ancillaryRole, String ancillaryRoleFieldName)
          Specifies the ancillary role attribute field for the specified feature class.
 void putEnabledDisabledFieldName(String featureClassName, String enabledDisabledFieldName)
          Specifies the enabled/disabled field for the specified feature class.
 void setFeatureDatasetNameByRef(IDatasetName rhs1)
          Feature dataset name to where the new geometric network is to be created.
 void setNetworkName(String rhs1)
          Name of the new geometric network.
 void setNetworkType(int rhs1)
          Network type of the new geometric network.
 void setSnapTolerance(double rhs1)
          Snap tolerance to be used in creating the new geometric network.
 

Method Detail

setNetworkType

void setNetworkType(int rhs1)
                    throws IOException,
                           AutomationException
Network type of the new geometric network.

Remarks

Currently, the only supported network type for the NetworkLoader is esriNTUtilityNetwork.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
rhs1 - A com.esri.arcgis.geodatabase.esriNetworkType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSnapTolerance

void setSnapTolerance(double rhs1)
                      throws IOException,
                             AutomationException
Snap tolerance to be used in creating the new geometric network.

Remarks

The SnapTolerance controls the search distance used for establishing connectivity during the network building process. The snap tolerance is specified in map units.

It is best to check to make sure that the snap tolerance you propose is not less than the minimum snap tolerance in the INetworkLoader2::MinSnapTolerance parameter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
rhs1 - The rhs1 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setNetworkName

void setNetworkName(String rhs1)
                    throws IOException,
                           AutomationException
Name of the new geometric network.

Remarks

You need to give your geometric network a name. The name of the geometric network must be unique within the geodatabase. If you only have one geometric network in your feature dataset you might choose to give it the same name as that of the feature dataset.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
rhs1 - The rhs1 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFeatureDatasetNameByRef

void setFeatureDatasetNameByRef(IDatasetName rhs1)
                                throws IOException,
                                       AutomationException
Feature dataset name to where the new geometric network is to be created.

Remarks

A geometric network is built within a feature dataset. The NetworkLoader needs a reference to the FeatureDatasetName object in which you want to build the geometric network.

The FeatureDatasetName property must be set before calling any of the methods on the INetworkLoader or INetworkLoader2 interfaces.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

addFeatureClass

void addFeatureClass(String featureClassName,
                     int newFeatureType,
                     IUID newClsID,
                     boolean canChangeGeometry)
                     throws IOException,
                            AutomationException
Adds a feature class to the new geometric network.

Remarks

A geometric network is built from feature classes. These feature classes must be contained within the feature dataset you specify. There are a few restrictions on which feature classes you can use. They must be either lines or points. They must not already be participating in a geometric network. In the case of SDE, they must not be registered as versioned. You can check for any of these violations by calling the INetworkLoader2::CanUseFeatureClass method.

The NetworkLoader object can only build geometric networks with simple junction features, simple edge features, and complex edge features. You can look at the help for the NetworkFeature object for more information on these types of features.

The canChangeGeometry parameter indicates whether or not the feature's geometry can be modified during snapping. If set to True, then the feature may be moved to snap to other features within the specified SnapTolerance. If set to False, then the feature will not be moved to snap to other features.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
featureClassName - The featureClassName (in)
newFeatureType - A com.esri.arcgis.geodatabase.esriFeatureType constant (in)
newClsID - A reference to a com.esri.arcgis.system.IUID (in)
canChangeGeometry - The canChangeGeometry (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addWeight

void addWeight(String networkWeightName,
               int weightType,
               int bitGateSize)
               throws IOException,
                      AutomationException
Adds a weight to the new geometric network.

Remarks

Weights must be created when the geometric network is created. To add a weight later on, the geometric network must be deleted and rebuilt.

The WeightType parameter determines which feature attributes can be associated to the weight. See the help on AddWeightAssociation for a list of types of feature attribute types that can be associated with each WeightType.

When specifying a WeightType not of type esriWTBitGate, set the BitGateSize parameter to 0.

For more information on Weights, please see the help for the NetWeight object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
networkWeightName - The networkWeightName (in)
weightType - A com.esri.arcgis.geodatabase.esriWeightType constant (in)
bitGateSize - The bitGateSize (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INetWeightEdit, INetWeightAssociation, INetWeightAssociationEdit, INetWeight

addWeightAssociation

void addWeightAssociation(String networkWeightName,
                          String featureClassName,
                          String fieldName)
                          throws IOException,
                                 AutomationException
Adds an association between a network weight and a feature class attribute.

Remarks

The weights you specified for your network using the AddWeight method need to have values. These values are taken from attributes of your feature classes. Adding weight associations tells the network which attributes belong to which weights. A weight can be associated with multiple feature classes. These associations are dependent on the type of field and the type of weight you created. The following table shows which types of weight can be associated to which types of feature attributes:

Weight Type Valid Feature Attribute Types
esriWTNull None
esriWTBitgate esriFieldTypeSmallInteger, esriFieldTypeInteger
esriWTInteger esriFieldTypeSmallInteger, esriFieldTypeInteger
esriWTSingle esriFieldTypeSingle
esriWTDouble esriFieldTypeSingle, esriFieldTypeDouble

You can only add a weight association to the network if both the feature class and the weight have already been added to the NetworkLoader object using the AddFeatureClass and AddWeight methods respectively.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
networkWeightName - The networkWeightName (in)
featureClassName - The featureClassName (in)
fieldName - The fieldName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INetWeightAssociation, INetWeightAssociationEdit

putAncillaryRole

void putAncillaryRole(String featureClassName,
                      int ancillaryRole,
                      String ancillaryRoleFieldName)
                      throws IOException,
                             AutomationException
Specifies the ancillary role attribute field for the specified feature class.

Remarks

A feature class that you specify as having an ancillary role means its features can either be sources or sinks and it will determine flow in your network. The feature classes you want to be built as having an ancillary role must be point feature classes. Multiple feature classes in the network can have ancillary roles. To do this, simply call the PutAncillaryRole method for each feature class to have ancillary roles.
The field name you specify will contain the ancillary role attribute for this feature class. It is strongly recommended to use the default name for the ancillary role field. The default name for the ancillary role field can be obtained from the DefaultAncillaryRoleField property on the INetworkLoaderProps interface. If you specify an existing field to use as the ancillary role field, it is best to check that this field is of the correct type and domain can become an ancillary role field. You can check this by calling the CheckAncillaryRoleField method. If the field specified does not exist, then the NetworkLoader will automatically add it to the feature class when it builds the network, populating all values in this field with the value 0.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
featureClassName - The featureClassName (in)
ancillaryRole - A com.esri.arcgis.geodatabase.esriNetworkClassAncillaryRole constant (in)
ancillaryRoleFieldName - The ancillaryRoleFieldName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

putEnabledDisabledFieldName

void putEnabledDisabledFieldName(String featureClassName,
                                 String enabledDisabledFieldName)
                                 throws IOException,
                                        AutomationException
Specifies the enabled/disabled field for the specified feature class.

Remarks

Every feature class in your network must have a field that determines whether a feature is enabled or disabled. Enabled and disabled features affect how flow and the trace results are determined.

It is strongly recommended to use the default name for the enabled/disabled field. If you do not make a call to PutEnabledDisabledFieldName for a feature class, then the NetworkLoader assumes that you wish to use the default name for the enabled/disabled field. The default name for the enabled/disabled field can be obtained from the DefaultEnabledField property on the INetworkLoaderProps interface.

If you specify an existing field to use as the enabled/disabled field, it is best to check that this field is of the correct type and domain to be used as an enabled/disabled field. You can check this by calling the CheckEnabledDisabledField method. You also have the option of resetting all values in the existing field to True, or preserving the existing values. See the help for the PreserveEnabledValues property for more details.

If the field specified does not exist, then the NetworkLoader will automatically add it to the feature class when it builds the network, populating all values in this field with the value True.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
featureClassName - The featureClassName (in)
enabledDisabledFieldName - The enabledDisabledFieldName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

loadNetwork

void loadNetwork()
                 throws IOException,
                        AutomationException
Creates the new geometric network inside the feature dataset.

Description

Once you have populated the NetworkLoader object with all of the parameters for your network you can call the LoadNetwork method.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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