|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.datasourcesfile.SMRouter
public class SMRouter
Deprecated as of 10.1. The object for calculating routes and defining route settings.
Constructor Summary | |
---|---|
SMRouter(Object obj)
Construct a SMRouter using a reference to such an object returned from ArcGIS Engine or Server. |
Method Summary | |
---|---|
void |
clearAllRestrictions()
Removes all restrictions set on the route solver. |
void |
clearRestriction(int index)
The method removes restriction at specified position from the list. |
boolean |
equals(Object o)
Compare this object with another |
int |
getBacktrackPolicy()
Controls the backtrack policy of the route solver. |
ISMNetBarriersCollection |
getBarriers()
The network barriers collection of the router object. |
String |
getDescription()
Descriptive text of the data product used in the routing service. |
int |
getDirectionsLengthUnits()
The output length units used in driving directions. |
ISMFlagCreator |
getFlagCreator()
The flag creator used by the router object. |
String |
getGeography()
The name of the geographic region covered by the routing service. |
String |
getNetAttributeName()
The network attribute that the router object currently uses. |
ISMNetAttributesCollection |
getNetAttributes()
The network attributes collection of the router object. |
ISMNetAttributesAccess |
getNetAttributesAccess()
The network attributes access of the router object. |
ISMRoadPreferences |
getPreferences()
The road preferences used by the router object. |
String |
getProductName()
Name of data product. |
String |
getProductVersion()
Version of data product. |
String |
getProjectionString()
The spatial reference of the source data used by the router object. |
ISMRestriction |
getRestriction(int index)
Restriction at the position, specified by index. |
int |
getRestrictionCount()
Number of restrictions in the list, which will be applied when finding route. |
ISMSpeedGroups |
getSpeedGroups()
The speed groups used by the router object. |
String |
getTime()
Date and time of data creation in ISO 8601 format. |
ISMTripPlanSettings |
getTripPlanSettings()
The trip planning settings used by the router object. |
String |
getVendor()
Name of data vendor. |
int |
hashCode()
the hashcode for this object |
ISMStopsCollection |
reorderStops(ISMStopsCollection pISrcStops)
Reorders the stops collection to minimize total driving time or distance. |
void |
setBacktrackPolicy(int pVal)
Controls the backtrack policy of the route solver. |
void |
setDirectionsLengthUnits(int pVal)
The output length units used in driving directions. |
void |
setNetAttributeName(String pVal)
The network attribute that the router object currently uses. |
void |
setRestriction(ISMRestriction pRestriction)
Sets a restriction to be used by the route solver. |
ISMDirections |
solve(ISMStopsCollection pIStops,
ISMBreakTracker pITracker)
Calculates the route using the current settings of the router object. |
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 SMRouter(Object obj) throws IOException
obj
to SMRouter
. *
SMRouter o = (SMRouter)obj; // will not work
SMRouter o = new SMRouter(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server
IOException
- if there are interop problems
SMRouter theSMRouter = (SMRouter) obj;
Method Detail |
---|
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public ISMNetBarriersCollection getBarriers() throws IOException, AutomationException
Returns the network barriers collection interface of the router object.
getBarriers
in interface ISMRouter
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISMNetAttributesCollection getNetAttributes() throws IOException, AutomationException
Returns the network attributes collection interface of the router object.
getNetAttributes
in interface ISMRouter
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISMRoadPreferences getPreferences() throws IOException, AutomationException
Returns the road preferences interface of the router.
getPreferences
in interface ISMRouter
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISMSpeedGroups getSpeedGroups() throws IOException, AutomationException
Returns the speed groups interface of the router object.
getSpeedGroups
in interface ISMRouter
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISMTripPlanSettings getTripPlanSettings() throws IOException, AutomationException
Returns the trip planning settings interface of the router object.
getTripPlanSettings
in interface ISMRouter
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getNetAttributeName() throws IOException, AutomationException
Returns the network attribute that the router object currently uses.
Currently SMRouter supports two network attributes: "Time" and "Length". Assign the NetAttributeName value "Time" if you want to find the quickest route. Assign the NetAttributeName value "Length" if you want to find the shortest route.
getNetAttributeName
in interface ISMRouter
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setNetAttributeName(String pVal) throws IOException, AutomationException
Sets the network attribute that the router will use.
Currently SMRouter supports two network attributes: "Time" and "Length". Assign the NetAttributeName value "Time" if you want to find quickest route. Assign the NetAttributeName value "Length" if you want to find shortest route.
setNetAttributeName
in interface ISMRouter
pVal
- The pVal (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISMStopsCollection reorderStops(ISMStopsCollection pISrcStops) throws IOException, AutomationException
Solves the TSP and repositions the stops collection, that is passed in, according to task solution.
reorderStops
in interface ISMRouter
pISrcStops
- A reference to a com.esri.arcgis.datasourcesfile.ISMStopsCollection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISMDirections solve(ISMStopsCollection pIStops, ISMBreakTracker pITracker) throws IOException, AutomationException
Builds the route using all the current settings of the router object.
The method returns the SMDirections object that contains the resulting path and driving directions texts. If no route is found then the method returns Nothing.
You need to pass an implementation of ISMBreakTracker interface as pBreakTracker parameter's value if you want to break route finding process according to some condition. If you don't need such functionality you can pass Nothing as the parameter's value.
solve
in interface ISMRouter
pIStops
- A reference to a com.esri.arcgis.datasourcesfile.ISMStopsCollection (in)pITracker
- A reference to a com.esri.arcgis.datasourcesfile.ISMBreakTracker (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISMNetAttributesAccess getNetAttributesAccess() throws IOException, AutomationException
Returns the network attributes access interface of the router object.
getNetAttributesAccess
in interface ISMRouter
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getProjectionString() throws IOException, AutomationException
Returns the projection string that corresponds to projection information of the routing data which the router object was created on.
Projection string is returned in the same format as the CreateESRISpatialReferenceFromPRJ() method of the ISpatialReferenceFactory.
getProjectionString
in interface ISMRouter
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISMFlagCreator getFlagCreator() throws IOException, AutomationException
Returns the flag creator interface of the router object.
getFlagCreator
in interface ISMRouter
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getVendor() throws IOException, AutomationException
getVendor
in interface ISMRoutingMetaData
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getProductName() throws IOException, AutomationException
getProductName
in interface ISMRoutingMetaData
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getProductVersion() throws IOException, AutomationException
getProductVersion
in interface ISMRoutingMetaData
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getGeography() throws IOException, AutomationException
getGeography
in interface ISMRoutingMetaData
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getDescription() throws IOException, AutomationException
getDescription
in interface ISMRoutingMetaData
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getTime() throws IOException, AutomationException
getTime
in interface ISMRoutingMetaData
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setRestriction(ISMRestriction pRestriction) throws IOException, AutomationException
The SetRestriction method can be called multiple times to set multiple restrictions on the route solver.
setRestriction
in interface ISMRouterSetup
pRestriction
- A reference to a com.esri.arcgis.datasourcesfile.ISMRestriction (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void clearAllRestrictions() throws IOException, AutomationException
clearAllRestrictions
in interface ISMRouterSetup
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getBacktrackPolicy() throws IOException, AutomationException
The BacktrackPolicy affects how the solver handles U-turns. Please see the esriSMBacktrackPolicy enumeration for possible options.
getBacktrackPolicy
in interface ISMRouterSetup
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setBacktrackPolicy(int pVal) throws IOException, AutomationException
setBacktrackPolicy
in interface ISMRouterSetup
pVal
- A com.esri.arcgis.datasourcesfile.esriSMBacktrackPolicy constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getDirectionsLengthUnits() throws IOException, AutomationException
getDirectionsLengthUnits
in interface ISMRouterSetup
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDirectionsLengthUnits(int pVal) throws IOException, AutomationException
setDirectionsLengthUnits
in interface ISMRouterSetup
pVal
- A com.esri.arcgis.datasourcesfile.esriSMDirectionsLengthUnits constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getRestrictionCount() throws IOException, AutomationException
getRestrictionCount
in interface ISMRouterSetup2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISMRestriction getRestriction(int index) throws IOException, AutomationException
getRestriction
in interface ISMRouterSetup2
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void clearRestriction(int index) throws IOException, AutomationException
clearRestriction
in interface ISMRouterSetup2
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |