|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface INetworkLoader
Provides access to members used to create a new geometric network.
The INetworkLoader, INetworkLoader2 and INetworkLoader3 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.
Use the INetworkLoader, INetworkLoader2 and INetworkLoader3 interfaces when you want to create a new geometric network.
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 |
---|
void setNetworkType(int rhs1) throws IOException, AutomationException
Currently, the only supported network type for the NetworkLoader is esriNTUtilityNetwork.
rhs1
- A com.esri.arcgis.geodatabase.esriNetworkType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSnapTolerance(double rhs1) throws IOException, AutomationException
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.
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setNetworkName(String rhs1) throws IOException, AutomationException
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.
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setFeatureDatasetNameByRef(IDatasetName rhs1) throws IOException, AutomationException
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.
rhs1
- A reference to a com.esri.arcgis.geodatabase.IDatasetName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addFeatureClass(String featureClassName, int newFeatureType, IUID newClsID, boolean canChangeGeometry) throws IOException, AutomationException
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. This property can only be used when creating geometric networks in pre-10.0 geodatabases. Starting with the 10.0 release; the parameter is ignored as the ability to allow snapping on a per feature class basis is no longer supported. Snapping is now supported on all or nothing option, either all feature classes are snapped or none of the feature classes are snapped. Use the INetworkLoader3::UseXYsForSnapping property to sepcify that all feature classes will be snapped during geometric network creation.
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addWeight(String networkWeightName, int weightType, int bitGateSize) throws IOException, AutomationException
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.
networkWeightName
- The networkWeightName (in)weightType
- A com.esri.arcgis.geodatabase.esriWeightType constant (in)bitGateSize
- The bitGateSize (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.INetWeightEdit
,
INetWeightAssociation
,
INetWeightAssociationEdit
,
INetWeight
void addWeightAssociation(String networkWeightName, String featureClassName, String fieldName) throws IOException, AutomationException
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.
networkWeightName
- The networkWeightName (in)featureClassName
- The featureClassName (in)fieldName
- The fieldName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.INetWeightAssociation
,
INetWeightAssociationEdit
void putAncillaryRole(String featureClassName, int ancillaryRole, String ancillaryRoleFieldName) throws IOException, AutomationException
featureClassName
- The featureClassName (in)ancillaryRole
- A com.esri.arcgis.geodatabase.esriNetworkClassAncillaryRole constant (in)ancillaryRoleFieldName
- The ancillaryRoleFieldName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void putEnabledDisabledFieldName(String featureClassName, String enabledDisabledFieldName) throws IOException, AutomationException
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.
featureClassName
- The featureClassName (in)enabledDisabledFieldName
- The enabledDisabledFieldName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void loadNetwork() throws IOException, AutomationException
Once you have populated the NetworkLoader object with all of the parameters for your network you can call the LoadNetwork method.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |