com.esri.arcgis.networkanalyst
Interface INALocator2

All Superinterfaces:
INALocator, Serializable
All Known Subinterfaces:
INALocator3
All Known Implementing Classes:
NALocator

public interface INALocator2
extends INALocator, Serializable

Provides access to properties that apply to all network locators.

Remarks

INALocator2 has been superseded by INALocator3.

Product Availability

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


Method Summary
 INALocation geocodeLocation(String address, ILocator addressLocator)
          The network location at the specified address.
 double getMaxSnapTolerance()
          The maximum distance that can be searched when expanding the snap tolerance.
 void queryOffsetPoint(INALocation location, double offset, int units, IPoint[] point)
          The point offset from a network location.
 String reverseGeocodeLocation(INALocation location, ILocator addressLocator)
          The address of the network location.
 void setMaxSnapTolerance(double maxTolerance)
          The maximum distance that can be searched when expanding the snap tolerance.
 
Methods inherited from interface com.esri.arcgis.networkanalyst.INALocator
addLocatorAgent, bind, createDefault, getLocatorAgent, getLocatorAgentCount, getNetworkDataset, getOutputSpatialReference, getSnapTolerance, getSnapToleranceUnits, isFindClosestAmongAllAgents, queryLocationByPoint, queryLocationByRow, queryPoint, removeLocatorAgent, setFindClosestAmongAllAgents, setOutputSpatialReferenceByRef, setSnapTolerance, setSnapToleranceUnits
 

Method Detail

getMaxSnapTolerance

double getMaxSnapTolerance()
                           throws IOException,
                                  AutomationException
The maximum distance that can be searched when expanding the snap tolerance. Has the same units as the snap tolerance.

Remarks

The INALocator::SnapTolerance property specifies the minimum search tolerance used when finding network locations. If nothing is found within this tolerance, the search tolerance is doubled until a network location is found or MaxSnapTolerance is reached.

Product Availability

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

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

setMaxSnapTolerance

void setMaxSnapTolerance(double maxTolerance)
                         throws IOException,
                                AutomationException
The maximum distance that can be searched when expanding the snap tolerance. Has the same units as the snap tolerance.

Remarks

The INALocator::SnapTolerance property specifies the minimum search tolerance used when finding network locations. If nothing is found within this tolerance, the search tolerance is doubled until a network location is found or MaxSnapTolerance is reached.

Product Availability

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

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

queryOffsetPoint

void queryOffsetPoint(INALocation location,
                      double offset,
                      int units,
                      IPoint[] point)
                      throws IOException,
                             AutomationException
The point offset from a network location.

Remarks

QueryOffsetPoint returns the spatial location of an NALocation after applying the offset distance and units specified. If the location occurs along a line, the (input location parameter) INALocation.Side property indicates whether the offset occurs to the left or right of the digitized direction of the line. In other words, if the location is on the left side, the offset occurs to the left. For locations on junctions, nothing is offset.

Generally, the NALocator should be retrieved from a NAContext. However, if you do create a NALocator, or have added a new locator agent, then, before querying the NALocator, Bind should be called on the NALocator to set up the agents and associate it with the NetworkDataset.

The output geometry is returned in the spatial reference of the network dataset. Optionally, set an OutputSpatialReference on the NALocator.

Product Availability

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

Parameters:
location - A reference to a com.esri.arcgis.networkanalyst.INALocation (in)
offset - The offset (in)
units - A com.esri.arcgis.system.esriUnits constant (in)
point - A reference to a com.esri.arcgis.geometry.IPoint (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reverseGeocodeLocation

String reverseGeocodeLocation(INALocation location,
                              ILocator addressLocator)
                              throws IOException,
                                     AutomationException
The address of the network location. Honors side of street if the address locator does.

Remarks

ReverseGeocodeLocation returns the text address of an NALocation based on the address locator specified.

Product Availability

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

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

geocodeLocation

INALocation geocodeLocation(String address,
                            ILocator addressLocator)
                            throws IOException,
                                   AutomationException
The network location at the specified address. Honors side of street if the address locator does.

Remarks

GeocodeLocation returns an NALocation based on the input address and address locator specfied.

It does this by using the point returned by the address locator and then iterating through the NALocator's locator agents calling QueryLocationByPoint.

Product Availability

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

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