com.esri.arcgis.networkanalyst
Interface INAClassLoader2

All Superinterfaces:
INAClassLoader, Serializable
All Known Implementing Classes:
NAClassLoader

public interface INAClassLoader2
extends INAClassLoader, Serializable

Provides access to populate network analysis classes in preparation for analysis.

Remarks

The INAClassLoader2 interface on NAClassLoader is used to simplify the initialization of the NAClassLoader object. It is also used to specify the snapping and reverse-geocoding properties of the NAClassLoader object.

Product Availability

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


Method Summary
 ILocator getAddressLocator()
          The address locator to be used.
 double getSnapOffsetDistance()
          The snap offset distance from the network.
 int getSnapOffsetUnits()
          The snap offset units.
 void initialize(INAContext context, String nAClassName, ICursor cursor)
          Quickly initializes the class loader to be able to load information from a cursor into a given NAClass.
 boolean isSnapToNetwork()
          Indicates if the geometry should be snapped to the network.
 void setAddressLocatorByRef(ILocator addressLocator)
          The address locator to be used.
 void setSnapOffsetDistance(double distance)
          The snap offset distance from the network.
 void setSnapOffsetUnits(int units)
          The snap offset units.
 void setSnapToNetwork(boolean enabled)
          Indicates if the geometry should be snapped to the network.
 
Methods inherited from interface com.esri.arcgis.networkanalyst.INAClassLoader
getFieldMap, getLocator, getNAClass, load, setFieldMapByRef, setLocatorByRef, setNAClassByRef
 

Method Detail

initialize

void initialize(INAContext context,
                String nAClassName,
                ICursor cursor)
                throws IOException,
                       AutomationException
Quickly initializes the class loader to be able to load information from a cursor into a given NAClass.

Remarks

The INAClassLoader2::Initialize method sets the Locator, NAClass, and FieldMap properties otherwise set via methods on the INAClassLoader interface.

Product Availability

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

Parameters:
context - A reference to a com.esri.arcgis.networkanalyst.INAContext (in)
nAClassName - The nAClassName (in)
cursor - A reference to a com.esri.arcgis.geodatabase.ICursor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAddressLocatorByRef

void setAddressLocatorByRef(ILocator addressLocator)
                            throws IOException,
                                   AutomationException
The address locator to be used.

Remarks

The AddressLocator property specifies the ILocator address locator used to determine the name of the network location based on reverse geocoding of the network location's geometry.

Product Availability

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

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

getAddressLocator

ILocator getAddressLocator()
                           throws IOException,
                                  AutomationException
The address locator to be used.

Remarks

The AddressLocator property specifies the ILocator address locator used to determine the name of the network location based on reverse geocoding of the network location's geometry.

Product Availability

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

Returns:
A reference to a com.esri.arcgis.geodatabase.ILocator
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSnapToNetwork

void setSnapToNetwork(boolean enabled)
                      throws IOException,
                             AutomationException
Indicates if the geometry should be snapped to the network.

Remarks

SnapToNetwork specifies if the network location's geometry should be a snapped to where it lies on the network dataset during load.

Specify the SnapOffsetDistance and SnapOffsetUnits if you want the network location offset a fixed difference from the true snap location. This is useful if you care about the side of the road the network location is on.

Product Availability

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

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

isSnapToNetwork

boolean isSnapToNetwork()
                        throws IOException,
                               AutomationException
Indicates if the geometry should be snapped to the network.

Remarks

SnapToNetwork specifies if the network location's geometry should be snapped to where it lies on the network dataset during load.

Specify the SnapOffsetDistance and SnapOffsetUnits if you want the network location offset a fixed difference from the true snap location. This is useful if you care about the side of the road the network location is on.

Product Availability

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

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

setSnapOffsetDistance

void setSnapOffsetDistance(double distance)
                           throws IOException,
                                  AutomationException
The snap offset distance from the network.

Remarks

Specify the SnapOffsetDistance and SnapOffsetUnits if you want the network location offset a fixed difference from the true snap location. This is useful if you care about the side of the road the network location is on.

This is only applicable if SnapToNetwork is true.

Product Availability

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

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

getSnapOffsetDistance

double getSnapOffsetDistance()
                             throws IOException,
                                    AutomationException
The snap offset distance from the network.

Remarks

Specify the SnapOffsetDistance and SnapOffsetUnits if you want the network location offset a fixed difference from the true snap location. This is useful if you care about the side of the road the network location is on.

This is only applicable if SnapToNetwork is true.

Product Availability

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

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

setSnapOffsetUnits

void setSnapOffsetUnits(int units)
                        throws IOException,
                               AutomationException
The snap offset units.

Remarks

Specify the SnapOffsetDistance and SnapOffsetUnits if you want the network location offset a fixed difference from the true snap location. This is useful if you care about the side of the road the network location is on.

This is only applicable if SnapToNetwork is true.

Product Availability

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

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

getSnapOffsetUnits

int getSnapOffsetUnits()
                       throws IOException,
                              AutomationException
The snap offset units.

Remarks

Specify the SnapOffsetDistance and SnapOffsetUnits if you want the network location offset a fixed difference from the true snap location. This is useful if you care about the side of the road the network location is on.

This is only applicable if SnapToNetwork is true.

Product Availability

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

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