|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.networkanalyst.NACompactStreetDirectionsAgent
public class NACompactStreetDirectionsAgent
Generates compact driving directions for network analysis results.
The NACompactStreetDirectionsAgent object generates driving directions on a route or multiple routes. 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 object 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")
Constructor Summary | |
---|---|
NACompactStreetDirectionsAgent()
Constructs a NACompactStreetDirectionsAgent using ArcGIS Engine. |
|
NACompactStreetDirectionsAgent(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. NACompactStreetDirectionsAgent theNACompactStreetDirectionsAgent = (NACompactStreetDirectionsAgent) 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. |
INACompactStreetDirectionsContainer |
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 |
void |
isDirty()
isDirty |
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 |
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 NACompactStreetDirectionsAgent() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic NACompactStreetDirectionsAgent(Object obj) throws IOException
NACompactStreetDirectionsAgent theNACompactStreetDirectionsAgent = (NACompactStreetDirectionsAgent) obj;
obj
to NACompactStreetDirectionsAgent
.
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 INACompactStreetDirectionsAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setLengthUnits(int units) 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.
setLengthUnits
in interface INACompactStreetDirectionsAgent
units
- A com.esri.arcgis.geodatabase.esriNetworkAttributeUnits constant (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 INACompactStreetDirectionsAgent
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 INACompactStreetDirectionsAgent
name
- The name (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 INACompactStreetDirectionsAgent
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 INACompactStreetDirectionsAgent
strLanguage
- The strLanguage (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INACompactStreetDirectionsContainer getDirectionsContainer() throws IOException, AutomationException
DirectionsContainer provides access to the directions contents.
getDirectionsContainer
in interface INACompactStreetDirectionsAgent
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 INACompactStreetDirectionsAgent
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 ISpatialReference getOutputSpatialReference() throws IOException, AutomationException
getOutputSpatialReference
in interface INACompactStreetDirectionsAgent2
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 INACompactStreetDirectionsAgent2
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 INACompactStreetDirectionsAgent2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IStringArray getAvailableStyleNames() throws IOException, AutomationException
getAvailableStyleNames
in interface INACompactStreetDirectionsAgent2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getStyleName() throws IOException, AutomationException
getStyleName
in interface INACompactStreetDirectionsAgent2
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 INACompactStreetDirectionsAgent2
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 INACompactStreetDirectionsAgent2
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 INACompactStreetDirectionsAgent2
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 |