com.esri.arcgis.networkanalyst
Interface INALocatorAgent

All Superinterfaces:
Serializable
All Known Subinterfaces:
INALocatorAgent2
All Known Implementing Classes:
NALocatorFeatureAgent, NALocatorLocationFieldsAgent

public interface INALocatorAgent
extends Serializable

Provides access to properties common to all locator agents.

Superseded By

INALocatorAgent2

Remarks

The INALocatorAgent interface contains methods common to all locator agents. Each locator agent has a name and Query methods.

Product Availability

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


Method Summary
 void bind(INetworkDataset pNetworkDataset, IGPMessages pGPMessages)
          Re-associate the locator with the given network dataset and its schema.
 String getName()
          The name of the locator agent.
 void queryLocationByPoint(IPoint point, double tolerance, INALocation[] location, IPoint[] outPoint, double[] distanceFromPoint)
          Find a network location from a point.
 void queryLocationByRow(IRow row, double tolerance, INALocation[] location, double[] distanceFromPoint)
          Find a network location from a row.
 void queryPoint(INALocation location, IPoint[] point)
          The point for the given network location.
 

Method Detail

getName

String getName()
               throws IOException,
                      AutomationException
The name of the locator agent.

Remarks

The Name of the locator agent.

Product Availability

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

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

queryLocationByPoint

void queryLocationByPoint(IPoint point,
                          double tolerance,
                          INALocation[] location,
                          IPoint[] outPoint,
                          double[] distanceFromPoint)
                          throws IOException,
                                 AutomationException
Find a network location from a point.

Remarks

QueryLocationByPoint searches for network locations based upon an input point. The corresponding NALocation, the point where the location was found, and the distance from the input point to the source feature found are all returned.

When the NALocatorFeatureAgent is used, the distance returned is from the point to the feature, not from the point to the actual network location on the feature. It is important to know the distance to the feature as a whole because this is the feature on which you want to locate the endpoint/midpoint. If you need to determine the distance from the input point to the actual network location point, use IProximityOperator::ReturnDistance between the input point and the output point.

The NALocatorLocationFieldsAgent should not be used with this method.

Product Availability

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

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

queryLocationByRow

void queryLocationByRow(IRow row,
                        double tolerance,
                        INALocation[] location,
                        double[] distanceFromPoint)
                        throws IOException,
                               AutomationException
Find a network location from a row.

Remarks

QueryLocationByRow searches for network locations based upon the inbound Row. The result is returned as an INALocation.

For a NALocatorFeatureAgent, if the row is a feature, QueryLocationByRow uses the feature geometry to populate the INALocation.

For a NALocatorLocationFieldsAgent, QueryLocationByRow uses the field names specified on INALocatorLocationFieldsAgent to populate the INALocation.

Product Availability

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

Parameters:
row - A reference to a com.esri.arcgis.geodatabase.IRow (in)
tolerance - The tolerance (in)
location - A reference to a com.esri.arcgis.networkanalyst.INALocation (in/out: use single element array)
distanceFromPoint - The distanceFromPoint (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryPoint

void queryPoint(INALocation location,
                IPoint[] point)
                throws IOException,
                       AutomationException
The point for the given network location.

Remarks

The result of calling QueryLocationByPoint or QueryLocationByRow is an INALocation. Use QueryPoint to get the Point that represents this location.

Product Availability

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

Parameters:
location - A reference to a com.esri.arcgis.networkanalyst.INALocation (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.

bind

void bind(INetworkDataset pNetworkDataset,
          IGPMessages pGPMessages)
          throws IOException,
                 AutomationException
Re-associate the locator with the given network dataset and its schema.

Remarks

Bind re-associates the NALocator with a network dataset. This method must be called before calling any of the Query functions.

Product Availability

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

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