com.esri.arcgis.networkanalyst
Interface INACompactStreetDirectionsAgent

All Superinterfaces:
Serializable
All Known Subinterfaces:
INACompactStreetDirectionsAgent2
All Known Implementing Classes:
NACompactStreetDirectionsAgent

public interface INACompactStreetDirectionsAgent
extends Serializable

Provides access to the compact directions agent.

Remarks

The INACompactStreetDirectionsAgent interface allows you to specify the properties for generating directions.

It generates directions that contain less information and compressed geometries representing the traversed streets. Due to their smaller size, these directions are better suited for passing across low bandwidth connections in server applications. To return these directions using NAServer, rather than using this interface directly, set the property INAServerRouteParams2::ReturnCompactDirections or INAServerClosestFacilityParams2::ReturnCompactDirections to true.

You get the NACompactStreetDirectionsAgent from the NAContext's list of agents using the name "CompactStreetDirectionsAgent". For example:

Set pStreetAgent = NAContext.Agents.ItemByName("CompactStreetDirectionsAgent")

Product Availability

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


Method Summary
 void execute(ISet set, ITrackCancel trackCancel)
          Constructs the directions.
 INACompactStreetDirectionsContainer getDirectionsContainer()
          The container for the directions.
 String getLanguage()
          Language to use when generating directions.
 int getLengthUnits()
          The length units.
 String getTimeAttributeName()
          The network attribute for time calculation.
 void setLanguage(String strLanguage)
          Language to use when generating directions.
 void setLengthUnits(int units)
          The length units.
 void setTimeAttributeName(String name)
          The network attribute for time calculation.
 

Method Detail

getLengthUnits

int getLengthUnits()
                   throws IOException,
                          AutomationException
The length units.

Remarks

LengthUnits specifies the length units of the directions in esriNetworkAttributeUnits. The currently supported length units for this property are esriNAUMiles, esriNAUKilometers, esriNAUMeters, esriNAUYards, and esriNAUFeet.

Product Availability

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

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

setLengthUnits

void setLengthUnits(int units)
                    throws IOException,
                           AutomationException
The length units.

Remarks

LengthUnits specifies the length units of the directions in esriNetworkAttributeUnits. The currently supported length units for this property are esriNAUMiles, esriNAUKilometers, esriNAUMeters, esriNAUYards, and esriNAUFeet.

Product Availability

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

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

getTimeAttributeName

String getTimeAttributeName()
                            throws IOException,
                                   AutomationException
The network attribute for time calculation.

Remarks

TimeAttributeName specifies the name of the time cost attribute used by directions.

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.

setTimeAttributeName

void setTimeAttributeName(String name)
                          throws IOException,
                                 AutomationException
The network attribute for time calculation.

Remarks

TimeAttributeName specifies the name of the time cost attribute used by directions.

Product Availability

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

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

getLanguage

String getLanguage()
                   throws IOException,
                          AutomationException
Language to use when generating directions.

Remarks

Specifies the Language you want to see the directions in.

This requires that you know which languages are supported by your directions configuration files.

Product Availability

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

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

setLanguage

void setLanguage(String strLanguage)
                 throws IOException,
                        AutomationException
Language to use when generating directions.

Remarks

Specifies the Language you want to see the directions in.

This requires that you know which languages are supported by your directions configuration files.

Product Availability

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

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

getDirectionsContainer

INACompactStreetDirectionsContainer getDirectionsContainer()
                                                           throws IOException,
                                                                  AutomationException
The container for the directions.

Remarks

DirectionsContainer provides access to the directions contents.

Product Availability

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

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

execute

void execute(ISet set,
             ITrackCancel trackCancel)
             throws IOException,
                    AutomationException
Constructs the directions.

Remarks

Execute is a method to compute the driving directions. This method takes a set containing the route features that you want to generate directions for. If null is passed in, it will generate directions for all routes. If you want to generate directions for a subset of the routes, create a new set object and add route features from the corresponding Routes or CFRoutes network analysis class.

Product Availability

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

Parameters:
set - A reference to a com.esri.arcgis.system.ISet (in)
trackCancel - A reference to a com.esri.arcgis.system.ITrackCancel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.