java.lang.Object
com.esri.arcgisruntime.tasks.networkanalysis.Stop
Represent stops - locations that must be visited along a route. Stops are part of
RouteParameters
which is
used as an input to RouteTask.solveRouteAsync(RouteParameters)
. You need at least two stops to compute a route,
although you can have more.- Since:
- 100.0.0
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
getAddedCost
(String attributeName) Gets the added cost that was set for this Stop.Gets the direction from which a vehicle arrives at this stop.Gets time of arrival at the stop.double
Time zone shift for arrival time, in minutes.double
getCumulativeCost
(String attributeName) Gets the cumulative cost.Gets theCurbApproach
that was set.double
Gets the current bearing in degrees.double
Gets the current bearing tolerance in degrees.Gets the direction from which a vehicle departs from the stop.Gets time of departure from the stop.double
Time zone shift for departure time, in minutes.double
Gets the distance to network location in meters.Gets the location the Stop should be placed on the map.Gets the location status.getName()
Gets the name that was set for this Stop.double
Gets the navigation latency in seconds.double
Gets the navigation speed in meters per second.Gets the Stop's location in the underlying transportation network.Gets the name of the route to which this Stop belongs.int
Gets the order in which stop is visited along the route.int
Gets the stop ID.Gets the time window end that was set.Gets the time window start that was set.getType()
Gets the type that was set for this stop.double
Gets the time (in minutes) by which the route arrives later than the permissible time window for the stop.double
Gets the time (in minutes) spent at the stop waiting for the time window to open when the route arrives early This is the difference betweengetArrivalTime()
andgetTimeWindowStart()
void
setAddedCost
(String attributeName, double addedCost) Sets the added cost for this Stop.void
setCurbApproach
(CurbApproach curbApproach) Sets the direction from which a vehicle may arrive at or depart from the stop.void
setCurrentBearing
(double currentBearing) Sets the current bearing in degrees.void
setCurrentBearingTolerance
(double currentBearingTolerance) Sets the current bearing tolerance in degrees.void
setGeometry
(Point location) Sets the location at which this Stop should be placed on the map.void
Sets the name for this Stop.void
setNavigationLatency
(double navigationLatency) Sets the navigation latency in seconds.void
setNavigationSpeed
(double navigationSpeed) Sets the navigation speed in meters per second.void
setNetworkLocation
(NetworkLocation networkLocation) Sets the Stop's location in the underlying transportation network.void
setRouteName
(String routeName) Sets the name of the route to which this Stop belongs.void
setStopId
(int stopId) Sets the stop ID.void
setTimeWindowEnd
(Calendar timeWindowEnd) Sets ending time of a permissible time window for the stop.void
setTimeWindowStart
(Calendar timeWindowStart) Sets the beginning time of a permissible time window for the stop.void
Sets the type for this stop.
-
Constructor Details
-
Stop
Creates an instance of Stop.- Parameters:
point
- geometry of the stop- Throws:
IllegalArgumentException
- if point is null- Since:
- 100.0.0
-
-
Method Details
-
getName
Gets the name that was set for this Stop.- Returns:
- the name. Default value is an empty string
- Since:
- 100.0.0
-
setName
Sets the name for this Stop.- Parameters:
name
- name. Null is treated as an empty string.- Since:
- 100.0.0
-
getType
Gets the type that was set for this stop.- Returns:
- the stop's type. Default value is
Stop.Type.STOP
- Since:
- 100.1.0
-
setType
Sets the type for this stop.- Parameters:
type
- the stop's type- Since:
- 100.1.0
-
getRouteName
Gets the name of the route to which this Stop belongs.- Returns:
- the route name. Default value is an empty string
- Since:
- 100.0.0
-
setRouteName
Sets the name of the route to which this Stop belongs. You can use this to group Stops into separate routes.- Parameters:
routeName
- route name. Null is treated as an empty string.- Since:
- 100.0.0
-
getCurbApproach
Gets theCurbApproach
that was set.- Returns:
- the curb approach. Default value is
CurbApproach.EITHER_SIDE
- Since:
- 100.0.0
-
setCurbApproach
Sets the direction from which a vehicle may arrive at or depart from the stop. For example, a school bus must approach and depart a school from its door side so that students entering/exiting the bus will not have to cross the street.- Parameters:
curbApproach
- curb approach- Throws:
IllegalArgumentException
- if curbApproach is null- Since:
- 100.0.0
-
getAddedCost
Gets the added cost that was set for this Stop.- Parameters:
attributeName
- attribute name. It can be empty. Null is treated as an empty string.- Returns:
- the added cost. Returns 0 if it was not set.
- Since:
- 100.0.0
-
setAddedCost
Sets the added cost for this Stop.- Parameters:
attributeName
- attribute name. It can be empty. Null is treated as an empty string.addedCost
- added cost- Since:
- 100.0.0
-
getNetworkLocation
Gets the Stop's location in the underlying transportation network.- Returns:
- the network location. Returns null by default
- Since:
- 100.0.0
-
setNetworkLocation
Sets the Stop's location in the underlying transportation network.- Parameters:
networkLocation
- network location. It can't be null- Throws:
IllegalArgumentException
- if networkLocation is null- Since:
- 100.0.0
-
getDistanceToNetworkLocation
public double getDistanceToNetworkLocation()Gets the distance to network location in meters.- Returns:
- the distance to network location in meters. Returns NaN by default.
- Since:
- 100.0.0
-
getCurrentBearing
public double getCurrentBearing()Gets the current bearing in degrees.- Returns:
- the current bearing in degrees. Returns Double.NaN by default
- Since:
- 100.0.0
- See Also:
-
setCurrentBearing
public void setCurrentBearing(double currentBearing) Sets the current bearing in degrees.Current bearing in degrees, measured clockwise from true north. Typical values are 0 to 360 or NaN. Negative values will be subtracted from 360 (e.g. -15 => 345). Values greater than 360 will be have 360 subtracted from them (e.g. 385 => 25). For this property to be used, the bearing tolerance also has to be set.
- Parameters:
currentBearing
- current bearing in degrees- Since:
- 100.0.0
- See Also:
-
getCurrentBearingTolerance
public double getCurrentBearingTolerance()Gets the current bearing tolerance in degrees.- Returns:
- the current bearing tolerance in degrees. Returns Double.NaN by default.
- Since:
- 100.0.0
- See Also:
-
setCurrentBearingTolerance
public void setCurrentBearingTolerance(double currentBearingTolerance) Sets the current bearing tolerance in degrees. Valid values are 0 to 180 or NaN.- Parameters:
currentBearingTolerance
- current bearing tolerance in degrees- Since:
- 100.0.0
- See Also:
-
getArrivalCurbApproach
Gets the direction from which a vehicle arrives at this stop.- Returns:
- the arrival curb approach. Returns
CurbApproach.UNKNOWN
by default - Since:
- 100.0.0
-
getDepartureCurbApproach
Gets the direction from which a vehicle departs from the stop.- Returns:
- the departure curb approach. Returns
CurbApproach.UNKNOWN
by default - Since:
- 100.0.0
-
getCumulativeCost
Gets the cumulative cost. The valid set of attribute names can be obtained fromRouteTaskInfo.getCostAttributes()
.- Parameters:
attributeName
- attribute name- Returns:
- the cumulative cost
- Since:
- 100.0.0
-
getArrivalTime
Gets time of arrival at the stop.- Returns:
- the arrival time. Returns null by default
- Since:
- 100.0.0
-
getArrivalTimeShift
public double getArrivalTimeShift()Time zone shift for arrival time, in minutes.- Returns:
- time zone shift for arrival time, in minutes
- Since:
- 100.0.0
-
getDepartureTime
Gets time of departure from the stop.- Returns:
- the departure time. Returns null by default
- Since:
- 100.0.0
-
getDepartureTimeShift
public double getDepartureTimeShift()Time zone shift for departure time, in minutes.- Returns:
- time zone shift for departure time, in minutes
- Since:
- 100.0.0
-
getTimeWindowStart
Gets the time window start that was set.- Returns:
- the time window start. Returns null if it was not set
- Since:
- 100.0.0
-
setTimeWindowStart
Sets the beginning time of a permissible time window for the stop. The route will attempt to visit the stop only within its time window, if possible. Can be null if you don't want to specify a time window constraint.- Parameters:
timeWindowStart
- time window start, Allows null value- Since:
- 100.0.0
-
getTimeWindowEnd
Gets the time window end that was set.- Returns:
- the time window end. Returns null if it was not set
- Since:
- 100.0.0
-
setTimeWindowEnd
Sets ending time of a permissible time window for the stop. The route will attempt to visit the stop only within its time window, if possible. Can be null if you don't want to specify a time window constraint.- Parameters:
timeWindowEnd
- time window end, allows null value- Since:
- 100.0.0
-
getLocationStatus
Gets the location status.- Returns:
- the location status. Returns
LocationStatus.NOT_LOCATED
by default. - Since:
- 100.0.0
-
getGeometry
Gets the location the Stop should be placed on the map.- Returns:
- the location of this Stop on the map
- Since:
- 100.0.0
-
setGeometry
Sets the location at which this Stop should be placed on the map.- Parameters:
location
- the location at which this Stop should be placed on the map- Throws:
IllegalArgumentException
- if location is null- Since:
- 100.4.0
-
getSequence
public int getSequence()Gets the order in which stop is visited along the route. A value of 1 implies it is the first stop, and so on.- Returns:
- the sequence. Returns 0 by default
- Since:
- 100.0.0
-
getStopId
public int getStopId()Gets the stop ID.This is a caller supplied foreign key that can be used to associate output stops with input stops.
- Returns:
- the stop ID
- Since:
- 100.6.0
- See Also:
-
setStopId
public void setStopId(int stopId) Sets the stop ID.This is a caller supplied foreign key that can be used to associate output stops with input stops.
- Parameters:
stopId
- the stop ID- Since:
- 100.6.0
- See Also:
-
getViolationTime
public double getViolationTime()Gets the time (in minutes) by which the route arrives later than the permissible time window for the stop. This is the difference betweengetArrivalTime()
andgetTimeWindowEnd()
- Returns:
- the violation time. Returns 0 by default
- Since:
- 100.0.0
-
getWaitTime
public double getWaitTime()Gets the time (in minutes) spent at the stop waiting for the time window to open when the route arrives early This is the difference betweengetArrivalTime()
andgetTimeWindowStart()
- Returns:
- the wait time. Returns 0 by default
- Since:
- 100.0.0
-