|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.networkanalyst.NAStreetDirectionsAgent
public class NAStreetDirectionsAgent
Generates driving directions for network analysis results.
The NAStreetDirectionsAgent object generates driving directions on a route or multiple routes.
You get the NAStreetDirectionsAgent from the NAContext's list of agents using the name "StreetDirectionsAgent". For example:
Set pStreetAgent = NAContext.Agents.ItemByName("StreetDirectionsAgent")
Constructor Summary | |
---|---|
NAStreetDirectionsAgent()
Constructs a NAStreetDirectionsAgent using ArcGIS Engine. |
|
NAStreetDirectionsAgent(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. NAStreetDirectionsAgent theNAStreetDirectionsAgent = (NAStreetDirectionsAgent) obj; |
Method Summary | |
---|---|
boolean |
applies(IDENetworkDataset network,
INAContextHelper contextHelper)
Indicates if the agent is appropriate to use with the given network dataset. |
boolean |
equals(Object o)
Compare this object with another |
void |
execute(ISet set,
ITrackCancel trackCancel)
Constructs the directions. |
IStringArray |
getAvailableStyleNames()
The collection of style names supported by the agent. |
void |
getClassID(GUID[] pClassID)
getClassID |
static String |
getClsid()
getClsid. |
INAStreetDirectionsContainer |
getDirectionsContainer()
The container for the directions. |
String |
getLanguage()
Language to use when generating directions. |
int |
getLengthUnits()
The length units. |
String |
getName()
The name of the agent. |
ISpatialReference |
getOutputSpatialReference()
Output spatial reference to use for geometries returned by the directions objects. |
int |
getOutputType()
Output type to use when generating directions. |
void |
getSizeMax(_ULARGE_INTEGER[] pcbSize)
getSizeMax |
String |
getStyleName()
Style name to use when generating directions. |
IStringArray |
getSupportedLanguages()
The collection of languages supported by the agent. |
String |
getTimeAttributeName()
The network attribute for time calculation. |
int |
hashCode()
the hashcode for this object |
void |
initialize(IDENetworkDataset network,
INAContextHelper contextHelper)
Get the agent ready for action. |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
boolean |
isAutoShowDirections()
Indicates if directions are automatically updated and shown when a route changes. |
void |
isDirty()
isDirty |
boolean |
isDisplayTime()
Indicates if time is displayed in directions. |
void |
load(IStream pstm)
load |
void |
onContextUpdated()
Called when the context is updated. |
void |
onResultUpdated()
Called when a result is updated. |
void |
readExternal(ObjectInput in)
|
void |
save(IStream pstm,
int fClearDirty)
save |
void |
setAutoShowDirections(boolean show)
Indicates if directions are automatically updated and shown when a route changes. |
void |
setDisplayTime(boolean display)
Indicates if time is displayed in directions. |
void |
setLanguage(String strLanguage)
Language to use when generating directions. |
void |
setLengthUnits(int units)
The length units. |
void |
setOutputSpatialReferenceByRef(ISpatialReference ppSpatialReference)
Output spatial reference to use for geometries returned by the directions objects. |
void |
setOutputType(int pOutputType)
Output type to use when generating directions. |
void |
setStyleName(String pStyleName)
Style name to use when generating directions. |
void |
setTimeAttributeName(String name)
The network attribute for time calculation. |
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public NAStreetDirectionsAgent() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic NAStreetDirectionsAgent(Object obj) throws IOException
NAStreetDirectionsAgent theNAStreetDirectionsAgent = (NAStreetDirectionsAgent) obj;
obj
to NAStreetDirectionsAgent
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String getName() throws IOException, AutomationException
Returns the name of the agent. This property is implemented within the agent; there is no need to set this property.
getName
in interface INAAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean applies(IDENetworkDataset network, INAContextHelper contextHelper) throws IOException, AutomationException
The method Applies indicates if the NAAgent should be attached to the NAContext referenced by the input INAContextHelper.
Applies returns true if the agent is applicable and has not already been attached to the NAContext. For example, a NAStreetDirectionsAgent will only apply to solvers that support driving directions.
applies
in interface INAAgent
network
- A reference to a com.esri.arcgis.geodatabase.IDENetworkDataset (in)contextHelper
- A reference to a com.esri.arcgis.networkanalyst.INAContextHelper (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void initialize(IDENetworkDataset network, INAContextHelper contextHelper) throws IOException, AutomationException
Initialize is called when the NAContext::Bind is called and the NAContext is getting into a consistent state.
initialize
in interface INAAgent
network
- A reference to a com.esri.arcgis.geodatabase.IDENetworkDataset (in)contextHelper
- A reference to a com.esri.arcgis.networkanalyst.INAContextHelper (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void onResultUpdated() throws IOException, AutomationException
OnResultUpdated is called when the NAContext::Result object has been updated. For example, this would be called after INASolver::Solve.
onResultUpdated
in interface INAAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void onContextUpdated() throws IOException, AutomationException
OnContextUpdated is called when the NAContext object has been updated. For example, this would be called after a network location has been added or removed.
onContextUpdated
in interface INAAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getLengthUnits() throws IOException, AutomationException
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.
getLengthUnits
in interface INAStreetDirectionsAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setLengthUnits(int units) throws IOException, AutomationException
setLengthUnits
in interface INAStreetDirectionsAgent
units
- A com.esri.arcgis.geodatabase.esriNetworkAttributeUnits constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isDisplayTime() throws IOException, AutomationException
DisplayTime indicates if the direction driving time should be displayed or not.
isDisplayTime
in interface INAStreetDirectionsAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDisplayTime(boolean display) throws IOException, AutomationException
DisplayTime indicates if the direction driving time should be displayed or not.
setDisplayTime
in interface INAStreetDirectionsAgent
display
- The display (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getTimeAttributeName() throws IOException, AutomationException
TimeAttributeName specifies the name of the time cost attribute used by directions.
getTimeAttributeName
in interface INAStreetDirectionsAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTimeAttributeName(String name) throws IOException, AutomationException
TimeAttributeName specifies the name of the time cost attribute used by directions.
setTimeAttributeName
in interface INAStreetDirectionsAgent
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isAutoShowDirections() throws IOException, AutomationException
AutoShowDirections indicates if the NADirectionsWindow is shown automatically after a route is solved.
isAutoShowDirections
in interface INAStreetDirectionsAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setAutoShowDirections(boolean show) throws IOException, AutomationException
AutoShowDirections indicates if the NADirectionsWindow will be shown automatically after a route is solved or not.
setAutoShowDirections
in interface INAStreetDirectionsAgent
show
- The show (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INAStreetDirectionsContainer getDirectionsContainer() throws IOException, AutomationException
DirectionsContainer provides access to the directions contents and a method to save the contents in a file in XML format.
getDirectionsContainer
in interface INAStreetDirectionsAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void execute(ISet set, ITrackCancel trackCancel) throws IOException, AutomationException
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.
execute
in interface INAStreetDirectionsAgent
set
- A reference to a com.esri.arcgis.system.ISet (in)trackCancel
- A reference to a com.esri.arcgis.system.ITrackCancel (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getLanguage() throws IOException, AutomationException
Specifies the Language you want to see the directions in.
This requires that you know which languages are supported by your directions configuration files.
getLanguage
in interface INAStreetDirectionsAgent2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setLanguage(String strLanguage) throws IOException, AutomationException
Specifies the Language you want to see the directions in.
This requires that you know which languages are supported by your directions configuration files.
setLanguage
in interface INAStreetDirectionsAgent2
strLanguage
- The strLanguage (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISpatialReference getOutputSpatialReference() throws IOException, AutomationException
getOutputSpatialReference
in interface INAStreetDirectionsAgent3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setOutputSpatialReferenceByRef(ISpatialReference ppSpatialReference) throws IOException, AutomationException
setOutputSpatialReferenceByRef
in interface INAStreetDirectionsAgent3
ppSpatialReference
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IStringArray getSupportedLanguages() throws IOException, AutomationException
Returns a string array of the supported languages for which this directions agent has been localized. The configuration files associated with street directions can be found in <install directory>\NetworkAnalyst\Directions.
getSupportedLanguages
in interface INAStreetDirectionsAgent3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IStringArray getAvailableStyleNames() throws IOException, AutomationException
getAvailableStyleNames
in interface INAStreetDirectionsAgent3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getStyleName() throws IOException, AutomationException
getStyleName
in interface INAStreetDirectionsAgent3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setStyleName(String pStyleName) throws IOException, AutomationException
setStyleName
in interface INAStreetDirectionsAgent3
pStyleName
- The pStyleName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getOutputType() throws IOException, AutomationException
getOutputType
in interface INAStreetDirectionsAgent3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setOutputType(int pOutputType) throws IOException, AutomationException
setOutputType
in interface INAStreetDirectionsAgent3
pOutputType
- A com.esri.arcgis.networkanalyst.esriDirectionsOutputType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getClassID(GUID[] pClassID) throws IOException, AutomationException
IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.
getClassID
in interface IPersist
pClassID
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void isDirty() throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
isDirty
in interface IPersistStream
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void load(IStream pstm) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
load
in interface IPersistStream
pstm
- A reference to a com.esri.arcgis.system.IStream (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void save(IStream pstm, int fClearDirty) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
save
in interface IPersistStream
pstm
- A reference to a com.esri.arcgis.system.IStream (in)fClearDirty
- The fClearDirty (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getSizeMax(_ULARGE_INTEGER[] pcbSize) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
getSizeMax
in interface IPersistStream
pcbSize
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |