The /solve
direct request find the best way to get from one location to another or to visit several locations.
The best route can be the quickest route for a given time of day considering the traffic conditions during that time, or it can be the shortest route that minimizes the travel distance. The Route service can also find the best route that visits each stop during permitted time windows you specify. If you have more than two stops to visit, the best route can be determined for the fixed order of locations you specify. This is called a simple route. Alternatively, the Route service can determine the best sequence in which to visit the locations (the traveling salesman problem). This is called an optimized route.
The solve
operation is performed on a network layer resource. The solve
operation is supported on a network layer with a layer
value of esri
.
Required parameters
stops
The locations
or feature
used to create the route or routes.
When specifying the stops, you can set attributes for each as follows:
Show attributes for stops
Attributes for stops
-
Namestring (length: 500)nullable
The name of the stop. The name is used in the driving directions. If the name is not specified, a unique name prefixed with Location is automatically generated in the output stops, routes, and directions.
-
ObjectIDinteger (non-negative)nullable
The object ID of the stop.
Object
is a unique identifier for the stop. If you want to maintain a relationship between input and output, setID preserve
toObject ID true
, and theObject
value of the input stop is included in the output routes (as theID Stop
field). TheID Object
value is also included in the output stops (as theID Object
field) and can be used to join additional information from the analysis outputs to the attribute of the stops. If theID Object
value is not specified, a unique ID is automatically generated in the output.ID
-
SourceIDinteger (non-negative)nullable
The numeric identifier of the network dataset source feature class on which the input point is located.
-
SourceOIDinteger (non-negative)nullable
The object ID of the feature in the source on which the input point is located.
-
PosAlongnumber (non-negative)nullable
The position along the digitized direction of the source line feature. This value is stored as a ratio. This attribute is null if the network location references a junction.
-
SideOfEdgeint enum
Allowed values:
1
,2
The side of the edge in relation to the digitized direction of the line feature.
This attribute is limited to a domain of two values:
1
: Right Side2
: Left Side
-
RouteNamestring (length: 1024)nullable
The name of the route to which the stop is assigned. Assigning the same route name to different stops causes those stops to be grouped together and visited by the same route. You can generate many routes in a single solve by assigning unique route names to different groups of stops.
For example, to find two distinct routes—a route with four stops and another with six stops—set
Route
toName Route1
for each of the four stops andRoute2
for each of the six stops. The service will produce two distinct routes and driving directions for each group of stops in a single request.If
Route
is not specified for any stops, all stops belong to the same route. IfName Route
is not specified for some stops, those stops are treated as unassigned and are not included in any route.Name -
Sequenceintegernullable
If the
find
parameter is set toBest Sequence false
, the output routes will visit the stops in the order you specify with this attribute. In a group of stops that have the sameRoute
value, the sequence number should be greater than 0 but not greater than the total number of stops. Also, the sequence number should not be duplicated.Name
-
TimeWindowStartdatetimenullable
The earliest time the stop can be visited. By specifying a start and end time for a stop's time window, you are defining when a route should visit the stop. When the impedance attribute is either specified by the
impedance
parameter value or theAttribute Name impedance
parameter value of the travel mode is time-based, the analysis will find a solution that minimizes overall travel and reaches the stop within the prescribed time window.Attribute Name The value is specified as an integer that represents the number of milliseconds since epoch (January 1, 1970).
This value can be specified either in UTC or local time, depending on the value given for the
time
parameter.Windows Are UTC If you specify this attribute, you also need to specify the
Time
attribute.Window End
-
TimeWindowEnddatetimenullable
The latest time the stop can be visited. By specifying a start and end time for a stop's time window, you are defining when a route will visit the stop. When the travel mode for the analysis uses an impedance attribute that is time based, specifying time-window values will cause the analysis to find a solution that minimizes overall travel and reaches the stop within the prescribed time window.
Together, the
Time
andWindow Start Time
attributes make up the time window within which a route can visit the stop. As withWindow End Time
, theWindow Start Time
value is specified as an integer that represents the number of milliseconds since epoch (January 1, 1970) and is interpreted as UTC or local time, depending on the value specified for theWindow End time
parameter.Windows Are UTC The time window specified using the
Time
andWindow Start Time
attributes is not considered a hard constraint by the service. That is, the service doesn't fail if the stop cannot be visited during the time window; instead, the service tries to find a route that visits the stop during its time window, but if time-window violations are inevitable, the service tries to find a solution that minimizes the time-window violation time for all stops in the problem.Window End If a route has to arrive early at the stop, a wait time is added to the total travel time of the route. Similarly, if the route arrives late at the stop, a violation time is added to the total travel time of the route. For example, If the time window on the stop is set as 10:00 AM to 11:00 AM and the earliest a route can reach the stop is 11:25 AM, a violation of 25 minutes is added to the total travel time.
-
CurbApproachint enumdefault:0
Allowed values:
0
,1
,2
,3
Specify the direction a vehicle can arrive at and depart from the stop. The options are as following:
0
: Either side of vehicle. The vehicle can approach and depart the stop in either direction. U-turns are allowed. You should choose this setting if your vehicle can make a U-turn at the order or if it can pull into a driveway or parking lot and turn around.1
: Right side of vehicle. When the vehicle approaches and departs the stop, the curb must be on the right side of the vehicle. A U-turn is prohibited.2
: Left side of vehicle. When the vehicle approaches and departs the stop, the curb must be on the left side of the vehicle. A U-turn is prohibited.3
: No U-turn. When the vehicle approaches the stop, the curb can be on either side of the vehicle; however, the vehicle must depart without turning around. Learn more about U-turn policies
Show illustration
Setting Coded value Description Either side of vehicle
0
The vehicle can approach and depart the stop in either direction, so a U-turn is allowed at the stop. This is the default value. This setting can be chosen if it is possible and desirable for a vehicle to turn around at the stop. This decision may depend on the width of the road and the amount of traffic or whether the stop has a parking lot where vehicles can pull in and turn around.
All arrival and departure combinations are allowed with the Either side of vehicle curb approach.
Right side of vehicle
1
When the vehicle approaches and departs the stop, the stop must be on the right side of the vehicle. A U-turn is prohibited. This is typically used for vehicles such as buses that must arrive with the bus stop on the right side.
The allowed arrival and departure combination for the Right side of vehicle curb approach is shown.
Left side of vehicle
2
When the vehicle approaches and departs the stop, the stop must be on the left side of the vehicle. A U-turn is prohibited. This is typically used for vehicles such as buses that must arrive with the bus stop on the left side.
The allowed arrival and departure combination for the Left side of vehicle curb approach is shown.
No U-Turn
3
When the vehicle approaches the stop, the stop can be on either side of the vehicle; however, when it departs, the vehicle must continue in the same direction it arrived. A U-turn is prohibited.
The allowed arrival and departure combinations for the No U-Turn curb approach are shown.
The
Curb
attribute is designed to work with both types of national driving standards: right-hand traffic (United States) and left-hand traffic (United Kingdom). First, consider an incident on the left side of a vehicle. It is always on the left side regardless of whether the vehicle travels on the left or right half of the road. What may change with national driving standards is your decision to approach an incident from one of two directions, that is, so it ends up on the right or left side of the vehicle. For example, if you want to arrive at an incident and not have a lane of traffic between the vehicle and the incident, choose 1 (Right side of vehicle) in the United States and 2 (Left side of vehicle) in the United Kingdom.Approach With right-hand traffic, the curb approach that leaves the vehicle closest to the stop is Right side of vehicle.
With left-hand traffic, the curb approach that leaves the vehicle closest to the stop is Left side of vehicle.
-
Attr_[Cost]number (non-negative)default:0nullable
The name of the attribute can be:
Attr
,_Travel Time Attr
,_Truck Travel Time Attr
,_Minutes Attr
,_Truck Minutes Attr
,_Walk Time Attr
,_Miles Attr
_Kilometers This attribute specifies how much additional time spent or distance traveled can occur at the stop. The value for this attribute is included in the total travel time or distance for the output routes and is also displayed in output directions or directionPoints as service time.
The value for this attribute is specified in the units of the cost attribute. For instance,
Attr
is in minutes._Travel Time Use cases:
You can add time to a stop to represent how long it takes to make a delivery, install equipment, or perform another task at the stop. Or the time required to reach the actual destination location from the location the stop locates on the streets. Similarly, adding extra distance may be useful to account for a long driveway or other road that isn't represented by the network dataset.
For example, suppose you are finding the best route through three stops. Suppose it requires 2 minutes to walk to the street location from where the route starts, you need to spend 10 minutes at Stop 2, and it takes 5 minutes to walk from the street location to the destination. The
Attr
attribute should be given values of 2, 10, and 5 for Stop 1, Stop 2, and Stop 3, respectively. If it takes 10 minutes to travel from Stop 1 to Stop 2 and 10 minutes to travel from Stop 2 to Stop 3, the total travel time to reach Stop 3 is displayed as 37 minutes (2 + 10 + 10 + 10 + 5), even though there is only 20 minutes of traveling to reach Stop 3._Travel Time However, when a distance-based cost attribute like
Miles
is used, it specifies the distance in miles that will be added when calculating total distance of the route. Generally the locations of the stops are not exactly on the streets but are set back somewhat from the road. TheAttr
attribute can be used to model the distance between the actual stop location and its location on the street if it is important to include that distance in the total travel distance._Miles Attr
is only referenced if_Miles Miles
is used in the analysis as impedance or accumulate attribute. -
LocationTypeint enumdefault:0
Allowed values:
0
,1
,2
Specifies the stop type. The field value is specified as one of the following integers (use the numeric code, not the name in the parentheses):
- 0: Stop—A location that the route will visit.
- 1: Waypoint—A location that the route will travel through without making a stop. Waypoints can be used to force the route to take a specific path (to go through the waypoint) without being considered an actual stop. Waypoints do not appear in directions.
- 2: Break—A location where the route stops for the driver to take a break.
-
Bearingnumber (non-negative)nullable
The direction in which a point is moving. The units are degrees and are measured clockwise from true north.
This attribute is used in conjunction with the
Bearing
attribute. Bearing data is usually sent automatically from a mobile device equipped with a GPS receiver. Try to include bearing data if you are loading an input location that is moving, such as a pedestrian or a vehicle. Using this attribute tends to prevent adding locations to the wrong edges, which can occur when a vehicle is near an intersection or an overpass, for example. Bearing also helps the solver determine the side of the street that the point is on.Tol -
BearingTolnumber (range: 0 - 180)default:30nullable
The bearing tolerance value creates a range of acceptable bearing values when locating moving points on an edge using the
Bearing
attribute.If the
Bearing
attribute value is within the range of acceptable values that are generated from the bearing tolerance on an edge, the point can be added as a network location there; otherwise, the closest point on the next-nearest edge is evaluated. The units are in degrees. A value of 30 means that when Network Analyst attempts to add a network location on an edge, a range of acceptable bearing values is generated 15 degrees to either side of the edge (left and right) and in both digitized directions of the edge. -
NavLatencynumber (non-negative)nullable
Indicates how much cost is expected to elapse from the moment GPS information is sent from a moving vehicle to a server and the moment the processed route is received by the vehicle's navigation device.
This attribute is only used in the solve process if the
Bearing
andBearing
fields also have values; however, providing aTol Nav
attribute value is optional, even when values are present in theLatency Bearing
andBearing
.Tol
Example
The example also shows how to specify the Name
attribute for each stop and group four stops into two routes, Route A and Route B, using the Route
attribute.
{
"features": [
{
"geometry": {
"x": -122.4079,
"y": 37.78356
},
"attributes": {
"Name": "From",
"RouteName": "Route A"
}
},
{
"geometry": {
"x": -122.404,
"y": 37.782
},
"attributes": {
"Name": "To",
"RouteName": "Route A"
token
type:stringRequired
Specify a token that provides the identity of a user that has the permissions to access the service. The security and authentication page provides more information about how an access token can be obtained.
f
type:enumRequired
Allowed values: json
, pjson
Use this parameter to specify the response format.
The pjson
value is used for printing the JSON response in a prettified format.
Optional parameters
travelMode
Choose the mode of transportation for the analysis.
Travel modes are managed and configured in ArcGIS Enterprise by the administrator of your organization to better reflect the organization's workflows.
startTime
Specify the time at which travel begins from the input stops.
The start
parameter can be used in the following three ways in your analysis:
-
start
is not specified— If theTime start
parameter has no value specified, the service uses static road speeds based on average historical speeds or posted speed limits. It uses posted speeds in areas where historical traffic information isn't available.Time -
start
specified asTime now
—If thestart
parameter is specified asTime now
, live traffic will be used where available.Example
Specify value of
now
The analysis will begin at current time and live traffic speeds are referenced in the analysis.
{ "startTime": "now" }
-
start
specified as specific day/time— If theTime start
parameter is specified as a time and day of the week, or live traffic is not available, historical traffic will be used.Time Example
Typical traffic on Sundays
17:00, January 7, 1990. Typical traffic on Sundays at 5:00 p.m.
{ "startTime": 631731600000 }
startTimeIsUTC
Specify the time zone or zones of the start
parameter.
If a value of now
is passed to start
parameter, the travel begins at current time. This will also override start
parameter value to be true
.
-
false
—Thestart
value refers to the time zone in which the first stop of each route is located. The start time uses the time zone that is geographically local to the first stop.Time Illustration of setting the value to
false
(use geographically Local time zone)Setting
start
to 9:00 a.m., January 4, 1990 (631443600000 milliseconds);Time start
toTime Is UTC false
; and submitting a valid request causes the drive times for points in the eastern time zone to start at 9:00 a.m. eastern Time and 9:00 a.m. central time for points in the central time zone. (The start times are offset by an hour in real or UTC time.)Input: start
is 9:00 a.m., January 4, 1990 (631443600000 milliseconds), andTime start
is set toTime Is UTC false
-
true
—Thestart
value refers to coordinated universal time (UTC). The start times for all points are simultaneous, regardless of time zones.Time Illustration of setting the value to
true
(use UTC)Setting
start
to 9:00 a.m., January 4, 1990 (631443600000 milliseconds);Time start
toTime Is UTC true
, the start times for points in the eastern time zone is 4:00 a.m. Eastern Time and 3:00 a.m. central time for those in the central time zone.Input: start
is 9:00 a.m., January 4, 1990 (631443600000 milliseconds), andTime start
is set toTime Is UTC true
timeWindowsAreUTC
Specify whether the Time
and Time
attribute values on stops
are specified in UTC or geographically local time.
See the startTimeIsUTC parameter for an explanation of UTC versus local time.
findBestSequence
Specify whether the service should reorder stops to find the optimized route.
false
—The service returns a route that visits stops in the order you define.true
—The service finds the best order to visit the stops. The service will account for a variety of variables so that the total travel distance or travel time for the route is minimized.
You can preserve the origin and the destination stops while allowing the service to reorder intermediary stops by setting the preserve
and preserve
parameters.
preserveFirstStop
type:booldefault:true
Allowed values: true
, false
Specify whether the service will keep the first stop fixed when reordering the stops.
true
—The service won't reorder the first stop. Choose this option if you are starting from a known location, such as your home, headquarters, or current location.false
—The service will not preserve the first stop and reorder all the stops.
This parameter is applicable only if the find
parameter value is true
.
preserveLastStop
type:booldefault:true
Allowed values: true
, false
Specify whether the service will keep the last stop fixed when reordering the stops.
true
—The service won't reorder the last stop. The output routes may begin at any stop but must end at the predetermined last stop.false
—The service will not preserve the last stop and reorder all the stops.
This parameter is applicable only if the find
parameter value is true
.
useTimeWindows
Specify whether the service will consider time windows specified on the stops when finding the best route. The time windows are specified on stops using the Time
and Time
attributes.
restrictUTurns
Allowed values: esri
, esri
, esri
, esri
Specify whether to restrict or permit the route from making U-turns at junctions.
To understand the available parameter values, a junction is a point where only two streets intersect each other. If three or more streets intersect at a point, it is called as an intersection. A cul-de-sac is a dead-end.
Expand to learn more about the available parameter values
This parameter can have the following values:
Parameter Value | Description |
---|---|
| U-turns are permitted everywhere. Permitting U-turns implies that the vehicle can turn around at a junction and double back on the same street. ![]() U-turns are permitted at junctions with any number of adjacent streets. |
| U-turns are prohibited at junctions where exactly two adjacent streets meet. ![]() U-turns are permitted only at intersections or dead ends. |
| U-turns are prohibited at all junctions and intersections and are permitted only at dead ends. ![]() U-turns are permitted only at dead ends. |
| U-turns are prohibited at all junctions, intersections, and dead-ends. Even when this parameter value is chosen, a route can still make U-turns at stops. To prohibit U-turns at a stop, you can set its |
useHierarchy
Specify whether hierarchy will be used when finding the shortest paths.
true
—Use hierarchy when travelling between stops. When hierarchy is used, the service prefers higher-order streets (such as freeways) to lower-order streets (such as local roads) and can be used to simulate the driver preference of traveling on freeways instead of local roads even if that means a longer trip. This is especially true when finding routes to faraway locations, because drivers on long-distance trips tend to prefer traveling on freeways where stops, intersections, and turns can be avoided. Using hierarchy is computationally faster, especially for long-distance routes, since the service can determine the best route from a relatively smaller subset of streets.false
—Do not use hierarchy when travelling between stops. When hierarchy is not used, the service considers all the streets and doesn't prefer higher-order streets when finding the route. This is often used when finding short-distance routes within a city.
impedanceAttributeName
Allowed values: Travel
, Minutes
, Truck
, Truck
, Walk
, Miles
, Kilometers
Specify the impedance.
Impedance is a value that quantifies travel along the transportation network. Travel distance is an example of impedance; it quantifies the length of walkways and road segments. Similarly, drive time—the typical time it takes to drive a car along a road segment—is an example of impedance. Drive times may vary by type of vehicle—for instance, the time it takes for a truck to travel along a path tends to be longer than a car—so there can be many impedance values representing travel times for different vehicle types. Impedance values may also vary with time; live and typical traffic reference dynamic impedance values. Each walkway and road segment stores at least one impedance value. When performing a network analysis, the impedance values are used to calculate the best results, such as finding the shortest route—the route that minimizes impedance—between two points.
The parameter can be specified using the following values:
Travel
—Historical and live traffic data is used. This option is good for modeling the time it takes automobiles to travel along roads at a specific time of day using live traffic speed data where available. When usingTime Travel
, you can optionally set the TravelTime::Vehicle Maximum Speed (km/h) attribute parameter to specify the physical limitation of the speed the vehicle is capable of traveling.Time Minutes
—Live traffic data is not used, but historical average speeds for automobiles data is used.Truck
—Historical and live traffic data is used, but the speed is capped at the posted truck speed limit. This is good for modeling the time it takes for the trucks to travel along roads at a specific time. When usingTravel Time Truck
, you can optionally set the TruckTravelTime::Vehicle Maximum Speed (km/h) attribute parameter to specify the physical limitation of the speed the truck is capable of traveling.Travel Time Truck
—Live traffic data is not used, but the smaller of the historical average speeds for automobiles and the posted speed limits for trucks are used.Minutes Walk
—The default is a speed of 5 km/hr on all roads and paths, but this can be configured through the WalkTime::Walking Speed (km/h) attribute parameter.Time Miles
—Length measurements along roads are stored in miles and can be used for performing analysis based on shortest distance.Kilometers
—Length measurements along roads are stored in kilometers and can be used for performing analysis based on shortest distance.
accumulateAttributeNames
Specify whether the service will accumulate values other than the value specified for impedance
.
For example, if impedance
is set to Travel
, the total travel time for the route will be calculated by the service. However, if you also want to calculate the total distance of the route in miles, you can specify Miles
as the value for the accumulate
parameter.
The parameter value is specified as a comma-separated list of names. The parameter values are the same as the impedance
parameter. For example, accumulate
indicates that the total cost of the route will also be calculated in miles and kilometers.
restrictionAttributeNames
Specify whether the restrictions will be honored by the service.
A restriction represents a driving preference or requirement. In most cases, restrictions cause roads or pathways to be prohibited, but they can also cause them to be avoided or preferred. For instance, using the Avoid Toll Roads
restriction will result in a route that will include toll roads only when it is required to travel on toll roads to visit a stop. Use Height Restriction
to route around clearances that are lower than the height of the vehicle. If the vehicle is carrying corrosive materials, you can use the Any Hazmat Prohibited
restriction to prevent hauling the materials along roads where it is marked as illegal to do so.
This parameter value is specified as a comma-separated list of restriction names. A value of null
indicates that no restrictions will be used when finding the best route, but only when travel
is set to null
.
Expand to see the restriction names supported by the service
Restriction name | Description |
---|---|
Any Hazmat Prohibited | The results will not include roads where transporting any kind of hazardous material is prohibited. |
Avoid Carpool Roads | The results will avoid roads that are designated exclusively for car pool (high-occupancy) vehicles. |
Avoid Express Lanes | The results will avoid roads designated as express lanes. |
Avoid Ferries | The results will avoid ferries. |
Avoid Gates | The results will avoid roads where there are gates, such as keyed access or guard-controlled entryways. |
Avoid Limited Access Roads | The results will avoid roads that are limited-access highways. |
Avoid Private Roads | The results will avoid roads that are not publicly owned and maintained. |
Avoid Roads Unsuitable for Pedestrians | The results will avoid roads that are unsuitable for pedestrians. |
Avoid Stairways | The results will avoid all stairways on a pedestrian-suitable route. |
Avoid Toll Roads | The results will avoid all toll roads for automobiles. |
Avoid Toll Roads for Trucks | The results will avoid all toll roads for trucks. |
Avoid Truck Restricted Roads | The results will avoid roads where trucks are not allowed, except when making deliveries. |
Avoid Unpaved Roads | The results will avoid roads that are not paved (for example, dirt, gravel, and so on). |
Axle Count Restriction | The results will not include roads where trucks with the specified number of axles are prohibited. The number of axles can be specified using the Number of Axles restriction parameter. |
Driving a Bus | The results will not include roads where buses are prohibited. Using this restriction will also ensure that the results will honor one-way streets. |
Driving a Taxi | The results will not include roads where taxis are prohibited. Using this restriction will also ensure that the results will honor one-way streets. |
Driving a Truck | The results will not include roads where trucks are prohibited. Using this restriction will also ensure that the results will honor one-way streets. |
Driving an Automobile | The results will not include roads where automobiles are prohibited. Using this restriction will also ensure that the results will honor one-way streets. |
Driving an Emergency Vehicle | The results will not include roads where emergency vehicles are prohibited. Using this restriction will also ensure that the results will honor one-way streets. |
Height Restriction | The results will not include roads where the vehicle height exceeds the maximum allowed height for the road. The vehicle height can be specified using the Vehicle Height (meters) restriction parameter. |
Kingpin to Rear Axle Length Restriction | The results will not include roads where the vehicle length exceeds the maximum allowed kingpin to rear axle for all trucks on the road. The length between the vehicle kingpin and the rear axle can be specified using the Vehicle Kingpin to Rear Axle Length (meters) restriction parameter. |
Length Restriction | The results will not include roads where the vehicle length exceeds the maximum allowed length for the road. The vehicle length can be specified using the Vehicle Length (meters) restriction parameter. |
Preferred for Pedestrians | The results will use preferred routes suitable for pedestrian navigation. |
Riding a Motorcycle | The results will not include roads where motorcycles are prohibited. Using this restriction will also ensure that the results will honor one-way streets. |
Roads Under Construction Prohibited | The results will not include roads that are under construction. |
Semi or Tractor with One or More Trailers Prohibited | The results will not include roads where semis or tractors with one or more trailers are prohibited. |
Single Axle Vehicles Prohibited | The results will not include roads where vehicles with single axles are prohibited. |
Tandem Axle Vehicles Prohibited | The results will not include roads where vehicles with tandem axles are prohibited. |
Through Traffic Prohibited | The results will not include roads where through traffic (nonlocal traffic) is prohibited. |
Truck with Trailers Restriction | The results will not include roads where trucks with the specified number of trailers on the truck are prohibited. The number of trailers on the truck can be specified using the Number of Trailers on Truck restriction parameter. |
Use Preferred Hazmat Routes | The results will prefer roads that are designated for transporting hazardous materials. |
Use Preferred Truck Routes | The results will prefer roads that are designated as truck routes, such as roads that are part of the national network as specified by the National Surface Transportation Assistance Act in the United States, or roads that are designated as truck routes by the state or province, or roads that are preferred by truckers when driving in an area. |
Walking | The results will not include roads where pedestrians are prohibited. |
Weight Restriction | The results will not include roads where the vehicle weight exceeds the maximum allowed weight for the road. The vehicle weight can be specified using the Vehicle Weight (kilograms) restriction parameter. |
Weight per Axle Restriction | The results will not include roads where the vehicle weight per axle exceeds the maximum allowed weight per axle for the road. The vehicle weight per axle can be specified using the Vehicle Weight per Axle (kilograms) restriction parameter. |
Width Restriction | The results will not include roads where the vehicle width exceeds the maximum allowed width for the road. The vehicle width can be specified using the Vehicle Width (meters) restriction parameter. |
attributeParameterValues
Specify additional values required by an attribute or restriction, such as to specify whether the restriction prohibits, avoids, or prefers travel on restricted roads. If the restriction is meant to avoid or prefer roads, you can further specify the degree to which they are avoided or preferred using this parameter. For example, you can choose to never use toll roads, avoid them as much as possible, or prefer them.
The parameter value is specified as an array of objects each having the following attributes:
attribute
—The name of the restriction or the impedance attribute.Name parameter
—The name of the parameter associated with the restriction or impedance attribute. An attribute can have one or moreName parameter
values based on its intended use, which implies you may need multipleName attribute
for a single attribute name.Parameter Values value
—The value for theparameter
that is used by the service when evaluating the restriction or impedance attribute.Name
When specifying the attribute
for restrictions, each restriction (listed as attribute
) has a parameter
value, Restriction Usage
, that specifies whether the restriction prohibits, avoids, or prefers travel on the roads associated with the restriction and the degree to which the roads are avoided or preferred.
The value
for the Restriction Usage
parameter
can be assigned any of the following string values or their equivalent numeric values listed in the parentheses:
PROHIBITED
(-1
)—Travel on the roads that have the restriction is prohibited.AVOID
(_HIGH 5
)—It is very unlikely the service will include in the route the roads that are associated with the restriction.AVOID
(_MEDIUM 2
)—It is unlikely the service will include in the route the roads that are associated with the restriction.AVOID
(_LOW 1.3
)—It is somewhat unlikely the service will include in the route the roads that are associated with the restriction.PREFER
(_LOW 0.8
)—It is somewhat likely the service will include in the route the roads that are associated with the restriction.PREFER
(_MEDIUM 0.5
)—It is likely the service will include in the route the roads that are associated with the restriction.PREFER
(_HIGH 0.2
)—It is very likely the service will include in the route the roads that are associated with the restriction.
Expand to see the default Restriction Usage values for the restrictions
Restriction name | Restriction parameter name | Restriction parameter default value |
---|---|---|
Any Hazmat Prohibited | Restriction Usage | PROHIBITED |
Avoid Carpool Roads | Restriction Usage | PROHIBITED |
Avoid Express Lanes | Restriction Usage | PROHIBITED |
Avoid Ferries | Restriction Usage | AVOID_MEDIUM |
Avoid Gates | Restriction Usage | AVOID_MEDIUM |
Avoid Limited Access Roads | Restriction Usage | AVOID_MEDIUM |
Avoid Private Roads | Restriction Usage | AVOID_MEDIUM |
Avoid Roads Unsuitable for Pedestrians | Restriction Usage | AVOID_HIGH |
Avoid Stairways | Restriction Usage | AVOID_HIGH |
Avoid Toll Roads | Restriction Usage | AVOID_MEDIUM |
Avoid Toll Roads for Trucks | Restriction Usage | AVOID_MEDIUM |
Avoid Truck Restricted Roads | Restriction Usage | AVOID_HIGH |
Avoid Unpaved Roads | Restriction Usage | AVOID_HIGH |
Axle Count Restriction | Number of Axles | 0 |
Axle Count Restriction | Restriction Usage | PROHIBITED |
Driving a Bus | Restriction Usage | PROHIBITED |
Driving a Taxi | Restriction Usage | PROHIBITED |
Driving a Truck | Restriction Usage | PROHIBITED |
Driving an Automobile | Restriction Usage | PROHIBITED |
Driving an Emergency Vehicle | Restriction Usage | PROHIBITED |
Height Restriction | Restriction Usage | PROHIBITED |
Height Restriction | Vehicle Height (meters) | 0 |
Kingpin to Rear Axle Length Restriction | Restriction Usage | PROHIBITED |
Kingpin to Rear Axle Length Restriction | Vehicle Kingpin to Rear Axle Length (meters) | 0 |
Length Restriction | Restriction Usage | PROHIBITED |
Length Restriction | Vehicle Length (meters) | 0 |
Preferred for Pedestrians | Restriction Usage | PREFER_LOW |
Riding a Motorcycle | Restriction Usage | PROHIBITED |
Roads Under Construction Prohibited | Restriction Usage | PROHIBITED |
Semi or Tractor with One or More Trailers Prohibited | Restriction Usage | PROHIBITED |
Single Axle Vehicles Prohibited | Restriction Usage | PROHIBITED |
Tandem Axle Vehicles Prohibited | Restriction Usage | PROHIBITED |
Through Traffic Prohibited | Restriction Usage | AVOID_HIGH |
Truck with Trailers Restriction | Restriction Usage | PROHIBITED |
Truck with Trailers Restriction | Number of Trailers on Truck | 0 |
Use Preferred Hazmat Routes | Restriction Usage | PREFER_MEDIUM |
Use Preferred Truck Routes | Restriction Usage | PREFER_HIGH |
Walking | Restriction Usage | PROHIBITED |
WalkTime | Walking Speed (km/h) | 5 |
Weight Restriction | Restriction Usage | PROHIBITED |
Weight Restriction | Vehicle Weight (kilograms) | 0 |
Weight per Axle Restriction | Restriction Usage | PROHIBITED |
Weight per Axle Restriction | Vehicle Weight per Axle (kilograms) | 0 |
Width Restriction | Restriction Usage | PROHIBITED |
Width Restriction | Vehicle Width (meters) | 0 |
Syntax and code sample for attribute parameter values
[
{
"attributeName": "<attribute1>",
"parameterName": "<parameter1>",
"value": "<value1>"
},
{
"attributeName": "<attribute2>",
"parameterName": "<parameter2>",
"value": "<value2>"
}
]
barriers
Specify one or more points that will act as temporary restrictions or represent additional time or distance that may be required to travel on the underlying streets. For example, a point barrier can be used to represent a fallen tree along a street or a time delay spent at a railroad crossing.
When specifying point barriers, you can set properties for each, such as its name or barrier type.
Show attributes for barriers
Attributes for barriers
-
Namestringnullable
The name of the barrier.
-
ObjectIDinteger (non-negative)nullable
The object ID of the barrier.
Object
is a unique identifier for the barrier. If you want to maintain a relationship between the input and output, setID preserve
toObject ID true
. TheObject
value of the input barrier is included in the output barrier (as theID Object
field) and can be used to join additional information from analysis outputs to the attribute of the barriers. If theID Object
value is not specified, a unique ID is automatically generated in the output.ID
-
BarrierTypeint enumdefault:0
Allowed values:
0
,2
Specify whether the point barrier restricts travel completely or adds time or distance when it is crossed.
The value for this attribute is specified as one of the following integers:
-
0
: Restriction. Prohibits travel through the barrier. The barrier is referred to as a restriction point barrier since it acts as a restriction.The first map shows the shortest path between two stops without any restriction point barriers. The second map has a road that is blocked by a fallen tree, so the shortest path between the same points is longer.
2
: Added Cost. Traveling through the barrier increases the travel time or distance by the amount specified in theAttr
attributes. This barrier type is referred to as an added cost point barrier._[ Cost]
The map on the left shows the shortest path between two stops without any added cost point barrier. For the map on the right, the travel time from stop one to stop two would be the same whether going around the north end of the block or the south end; however, since crossing railroad tracks incurs a time penalty (modeled with added cost point barriers), the route with only one railroad crossing is chosen. The cost of crossing the barrier is added to the accumulated travel time of the resulting route.
-
-
FullEdgeint enumdefault:0
Allowed values:
0
,1
Specify how the restriction point barriers are applied to the edge elements during the analysis
0
:False—Permits travel on the edge up to the barrier but not through it.1
:True—Restricts travel anywhere on the associated edge.
-
Attr_[Cost]number (non-negative)default:0
Indicates how the cost (time or distance) is added when the barrier is traversed. This attribute is applicable only for added cost point barriers. The attribute value must be greater than or equal to zero.
polylineBarriers
Specify one or more lines that prohibit travel anywhere the lines intersect the streets. For example, a parade or protest that blocks traffic across several street segments can be modeled with a line barrier. A line barrier can also quickly fence off several roads from being traversed, thereby channeling possible routes away from undesirable parts of the street network.

The first map displays the shortest path between two stops. The second map shows the shortest path when several streets are blocked by a polyline barrier.
When specifying line barriers, you can set the name of each barrier using the following attribute:
Show attributes for polylineBarriers
Attributes for polylineBarriers
-
Namestring (length: 500)nullable
The name of the barrier.
-
ObjectIDinteger (non-negative)nullable
The object ID of the line barrier.
Object
is a unique identifier for the line barrier. If you want to maintain a relationship between the input and output, setID preserve
toObject ID true
. TheObject
value of the input line barrier is included in the output line barrier (as theID Object
field) and can be used to join additional information from analysis outputs to the attribute of the line barriers. If theID Object
value is not specified, a unique ID is automatically generated in the output.ID
Show example
This example shows how to add two lines as polyline barriers to restrict travel on the streets intersected by the lines. Barrier 1 is a single-part line feature composed of two points. Barrier 2 is a two-part line feature. The first part is composed of three points, and the second part is composed of two points.
{
"spatialReference": {
"wkid": 102100
},
"features": [
{
"geometry": {
"paths": [
[
[-10804823.397, 3873688.372],
[-10804811.152, 3873025.945]
]
]
},
"attributes": {
"Name": "Barrier 1"
}
},
{
"geometry": {
polygonBarriers
Specify polygons that either completely restrict travel or proportionately scale the time or distance required to travel on the streets intersected by the polygons.
When specifying polygon barriers, you can set properties for each, such as its name or barrier type, using the following attributes:
Show attributes for polygonBarriers
Attributes for polygonBarriers
-
Namestringnullable
The name of the barrier.
-
ObjectIDinteger (non-negative)nullable
The object ID of the polygon barrier.
Object
is a unique identifier for the polygon barrier. If you want to maintain a relationship between the input and output, setID preserve
toObject ID true
. TheObject
value of the input polygon barrier is included in the output polygon barrier (as theID Object
field) and can be used to join additional information from analysis outputs to the attribute of the polygon barriers. If theID Object
value is not specified, a unique ID is automatically generated in the output.ID
-
BarrierTypeint enumdefault:0
Allowed values:
0
,1
Specify polygons that either completely restrict travel or proportionately scale the time or distance required to travel on the streets intersected by the polygons.
The value for this attribute can be specified as one of the following integers:
-
0
: Restriction. Prohibits traveling through any part of the barrier. The barrier is referred to as a restriction polygon barrier since it prohibits traveling on streets intersected by the barrier. One use of this type of barrier is to model floods covering areas of the street that make traveling on those streets impossible.The first map depicts the shortest path between two stops. The second map shows a polygon barrier blocking flooded streets, so the shortest path between the same two stops is different.
-
1
: Scaled Cost. Scales the cost (such as travel time or distance) required to travel the underlying streets by a factor specified using theAttr
attributes._[ Cost] If the streets are partially covered by the barrier, the travel time or distance is apportioned and then scaled. For example, a factor of 0.25 means that travel on underlying streets is expected to be four times faster than normal. A factor of 3.0 means it is expected to take three times longer than normal to travel on underlying streets. This barrier type is referred to as a scaled-cost polygon barrier. It can be used to model storms that reduce travel speeds in specific regions, for example.
The first map shows a route that goes through inclement weather without regard for the effect that poor road conditions have on travel time. The second map shows a scaled polygon barrier that doubles the travel time of the roads covered by the storm. The route still passes through the southern tip of the storm since it is quicker to spend more time driving slowly through a small part of the storm rather than driving completely around it. The service uses the modified travel time in calculating the best route, and the modified travel time is reported as the total travel time in the response.
-
-
Attr_[Cost]number (non-negative)default:0
This is the factor by which the cost of the streets intersected by the barrier is multiplied. This attribute is applicable only for scaled cost barriers. The attribute value must be greater than zero.
Show example
This example shows how to add two polygons as barriers. The first polygon, Flood zone, is a restriction polygon barrier that prohibits travel on the underlying streets. The polygon is a single-part polygon feature composed of four points. The second polygon, Severe weather zone, is a scaled-cost polygon barrier that reduces the travel time on underlying streets to one-third of the original value. The polygon is a two-part polygon feature. Both parts are composed of four points.
{
"spatialReference": {
"wkid": 4326
},
"features": [
{
"geometry": {
"rings": [
[
[-97.0634, 32.8442],
[-97.0554, 32.84],
[-97.0558, 32.8327],
[-97.0638, 32.83],
[-97.0634, 32.8442]
]
]
},
"attributes": {
"Name": "Flood zone",
"BarrierType": 0
returnDirections
Specify whether the service will generate driving directions for each route.
true
—Directions will be generated and configured based on the value of thedirections
,Language directions
Output Type directions
, andStyle Name directions
parameter. The directions are available in theLength Units directions
property of the JSON response.false
—Directions will not be generated.
directionsLanguage
Specify the language that will be used when generating travel directions.
This parameter applies only when the return
parameter is set to true
.
Show all supported languages
The service supports generating directions in the following languages:
ar
: Arabicbg
: Bulgarianbs
: Bosnianca
: Catalancs
: Czechda
: Danishde
: Germanel
: Greeken
: Englishes
: Spanishet
: Estonianfi
: Finnishfr
: Frenchhe
: Hebrewhr
: Croatianhu
: Hungarianid
: Indonesianit
: Italianja
: Japaneseko
: Koreanlt
: Lithuanianlv
: Latviannb
: Norwegiannl
: Dutchpl
: Polishpt-
: Portuguese (Brazil)BR pt-
: Portuguese (Portugal)PT ro
: Romanianru
: Russiansk
: Slovaksl
: Sloveniansr
: Serbiansv
: Swedishth
: Thaitr
: Turkishuk
: Ukrainianvi
: Vietnamesezh-
: Chinese (China)CN zh-
: Chinese (Hong Kong)HK zh-
: Chinese (Taiwan)TW
The service searches for an exact match for the specified language including any language localization. If no exact match is found, it tries to match the language family. If a match is still not found, the service returns the directions using the default language of the server's operating system. For example, if the directions language is specified as es-
(Mexican Spanish), the service will return the directions in Spanish, as it supports the es language code, not es-
.
directionsOutputType
Allowed values: esri
,esri
, esri
, esri
, esri
, esri
Specify the content and verbosity of the driving directions.
This parameter applies only when the return
parameter is set to true
and can be specified using the following values:
esri
—The directions output includes all directions properties.DOT Complete esri
—The directions output includes all directions properties except events.DOT Complete No Events esri
—The directions output includes text instructions, time, length and ETA. The directions do not include geometry.DOT Instructions Only esri
—The directions output includes text instructions, time, length, ETA, and geometry. The directions do not include events, new types of strings (street names, signposts information), maneuver type, bearings, or turn angle.DOT Standard esri
—The directions output contains a summary (time and length). Detailed text instructions and geometry are not included.DOT Summary Only esri
—The directions output includes two feature sets: direction points and direction lines. The direction points set contains point features representing the direction maneuvers such as arriving to or departing from a stop, turning left or right, and other events along the route. This feature set also contains the route's turn-by-turn directions. The direction lines set contains line features for each segment of the route. This feature set can be used to visualize the turn-by-turn directions on a map.DOT Feature Sets
directionsStyleName
Allowed values: N
, N
, N
Specify the name of the formatting style for the directions. This parameter can be specified using the following values:
N
—Generates turn-by-turn directions suitable for printing.A Desktop N
—Generates turn-by-turn directions designed for an in-vehicle navigation device.A Navigation
N
—Generates turn-by-turn walking directions designed for pedestrian routes.A Campus
This parameter applies only when the return
parameter is set to true
.
directionsLengthUnits
Allowed values: esri
, esri
, esri
, esri
, esri
, esri
Specify the units for displaying travel distance in the driving directions. This parameter applies only when the return
parameter is set to true
.
returnRoutes
type:enumdefault:true
Allowed values: true
, false
Specify whether the service will return routes.
true
—Routes are returned. The routes are available in theroutes
property of the JSON response. The shape of the routes depends on the value for theoutput
parameter.Lines false
—Routes are not returned.
directionsTimeAttributeName
Allowed values: Travel
, Minutes
, Truck
, Truck
, Walk
Specify the time-based impedance attribute to display the duration of a maneuver, such as "Go northwest on Alvarado St. for 5 minutes.
"
The units for all the time attributes is minutes.
Travel
—Travel time for a car.Time Minutes
—Travel time for a car without using live traffic data.Truck
—Travel time for a truck.Travel Time Truck
—Travel time for a truck without using live traffic data.Minutes Walk
—Travel time for a pedestrian.Time
outputLines
Allowed values: esri
, esri
, esri
, esri
Specify the type of route features that are output by the service. This parameter is applicable only if the return
parameter is set to true
. The output
parameter can have one of the following values:
esri
—Return the exact shape of the resulting route that is based on the underlying streets.NA Output Line True Shape esri
—Return the exact shape of the resulting route that is based on the underlying streets and include route measurements that keep track of the cumulative travel time or travel distance along the route relative to the first stop. When this value is chosen for theNA Output Line True Shape With Measure output
parameter, each point in the route shape will include an m-value along with an x-value and a y-value. The m-value, also known as the measure value, indicates the accumulated travel time or travel distance at that point along the route. The m-values can be used to determine how far you have traveled from the start of the route or the remaining distance or time left to reach the destination. The m-values are in the same units as the impedance attribute.Lines esri
—Return a straight line between the stops.NA Output Line Straight
esri
—Do not return any shapes for the routes. This value can be useful when you are only interested in determining the total travel time or travel distance of the route. For example, if the application has calculated the route and after some time it will calculate the estimated time of arrival (ETA) to the destination, you can set theNA Output Line None return
parameter toRoutes true
and theoutput
parameter toLines esri
. TheNA Output Line None routes
property of the JSON response will only contain the total travel time that can be used to determine the ETA. Since the route shape is not returned when using theesri
value, the response size will be considerably smaller.NA Output Line None
returnStops
type:enumdefault:false
Allowed values: true
, false
Specify whether stops will be returned by the service.
true
—Stops used as input will be returned as part of thestops
property in the JSON response.false
—Stops are not returned.
When finding optimized routes, the return
property can be set to true
to determine the optimal sequence in which the route visits a particular stop by reviewing the Sequence
property in the JSON response. If you specified the stops
parameter value using a REST query request to any ArcGIS Server feature, map, or geoprocessing service that returns a JSON feature set, you can set the return
parameter to true
so you can draw the stop locations in the application. You can also set the return
property to true
to determine whether the stops were successfully located on the street network or had other errors by reviewing the Status
property in the JSON response.
returnBarriers
Specify whether barriers will be returned by the service
true
—The input point barriers are returned as part of thebarriers
property in the JSON response.false
—Point barriers are not returned.
For this parameter to take effect, you must also specify a value for the barriers
parameter.
If you specified the barriers
parameter value using a REST query request to any ArcGIS Server feature, map, or geoprocessing service that returns a JSON feature set, you can set the return
parameter to true
so you can draw the point barrier locations in the application. You can also set the return
property to true
to see where the barriers were located on the street network or, if they weren't located, understand what the problem was by reviewing the Status
property in the JSON response.
returnPolylineBarriers
Specify whether polyline barriers will be returned by the service.
true
—The input polyline barriers are returned as part of thepolyline
property in the JSON response.Barriers false
—Polyline barriers are not returned.
For this parameter to take effect, you must also specify a value for the polyline
parameter.
If you specified the polyline
parameter value using a REST query request to any ArcGIS Server feature, map, or geoprocessing service that returns a JSON feature set, you can set the return
parameter to true
so you can draw the polyline barrier locations in the application.
returnPolygonBarriers
Specify whether polygon barriers will be returned by the service.
true
—The input polygon barriers are returned as part of thepolygon
property in the JSON response.Barriers false
—Polygon barriers are not returned.
For this parameter to take effect, you must also specify a value for the polygon
parameter.
If you specified the polygon
parameter value using a REST query request to any ArcGIS Server feature, map, or geoprocessing service that returns a JSON feature set, you can set the return
parameter to true
so you can draw the polygon barrier locations in the application.
returnTraversedEdges
Specify whether traversed edges will be returned by the service.
true
—The traversed edges are returned as part of the JSON response.false
—The traversed edges are not returned.
When this parameter is set to true
, the traversed edges are available in the traversed
property of the JSON response.
returnTraversedJunctions
Specify whether traversed junctions will be returned by the service.
true
—The traversed junctions are returned as part of the JSON response.false
—The traversed junctions are not returned.
When this parameter is set to true
the traversed junctions are available in the traversed
property of the JSON response.
returnTraversedTurns
Specify whether traversed turns will be returned by the service.
true
—The traversed turns are returned as part of the JSON response.false
—The traversed turns are not returned.
When this parameter is set to true
, the traversed turns are available in the traversed
property of the JSON response.
ignoreInvalidLocations
Specify whether invalid input locations will be ignored.
true
—Network locations that are unlocated will be ignored and the analysis will run using valid network locations only. The analysis will also continue if locations are on non-traversable elements or have other errors. This is useful if you know the network locations are not all correct, but you want to run the analysis with the network locations that are valid.false
—Invalid locations will not be ignored. Do not run the analysis if there are invalid locations. Correct the invalid locations and rerun the analysis.
outSR
This parameter contains additional settings that affect task operation, for example, the spatial reference of the output features.
outputGeometryPrecision
Specify the simplification level for the route geometry returned by the service.
Simplification maintains critical points on a route, such as turns at intersections, to define the essential shape of the route and removes other points. The simplification distance you specify is the maximum allowable offset that the simplified line can deviate from the original line. Simplifying a line reduces the number of vertices that are part of the route geometry. This reduces the overall response size and also improves the performance for drawing the route shapes in applications.
The units are specified using the output
parameter.
outputGeometryPrecisionUnits
Allowed values: esri
, esri
, esri
, esri
, esri
, esri
, esri
, esri
, esri
, esri
, esri
, esri
Specify the units for the output
parameter value.
geometryPrecision
Specify the number of decimal places that will be used in the response geometries returned by the solve operation. This applies to x- and y-values only (not m- or z-values).
geometryPrecision = 3
geometryPrecisionM
Specify the number of decimal places that will be used in the response geometries returned by the solve operation. This applies to m-values only (not x-, y-, or z-values).
geometryPrecisionM = 3
overrides
preserveObjectID
Specify whether the object IDs specified for input locations such as stops or barriers will be preserved when the input locations are returned as output. This can be useful if you want to associate additional attributes with the output locations after the solve operation is successful and need a common key field to do the join.
For example, the input stops are specified as the following JSON representation of a feature set:
{
"spatialReference": {
"wkid": 4326
},
"features": [
{
"geometry": {
"x": -122.473948,
"y": 37.7436
},
"attributes": {
"ObjectID": 40,
"Name": "Depot"
}
},
{
"geometry": {
"x": -122.439613,
"y": 37.746144
},
If you solve a route and specify preserve
, the output stops will have object IDs of 1, 2, 3, and 4 even though the input stops have object IDs of 10, 20, 30, and 40. However, if preserve
, the output stops will have the same object IDs as the inputs: 10, 20, 30, and 40.
returnEmptyResults
Specify whether the service will return empty results instead of the error property when the request fails.
true
—The JSON response doesn't contain the error property when the request fails. All errors are returned in the messages property. The response JSON may contain an empty feature set or empty result for the properties you requested.false
—The JSON response only contains the error property when the request fails.
Typically when a request fails, the service will return a JSON response that contains the error property. In some cases, you might want to set return
to true
so it always returns properties you requested instead of returning an error response to help handle the response in a more consistent way.
Even if the request fails, when you set return
and return
, you can return stops to investigate why some of them failed to locate.
locateSettings
Specify settings that affect how inputs are located, such as the maximum search distance to use when locating the inputs on the network or the network sources being used for locating.
Show examples
Examples for locate settings
Specify locate settings using a JSON structure
This example shows how to specify locate settings so inputs are only located within 500 meters of the specified location. A small search tolerance like this can be helpful if you are solving using a walking travel mode and don't want inputs to be located farther than 500 meters from the original point location.
{
"default": {
"tolerance": 500,
"toleranceUnits": "esriMeters",
"allowAutoRelocate": true,
"sources": [
{
"name": "Routing_Streets"
}
]
}
}
Response objects
On successful completion, the service returns the best paths between the stops and the status indicating whether the analysis was successful using the output parameters described below.
stops
Provides access to the attributes of the stops that are visited by the routes as well as stops that cannot be reached by any of the routes.
The following table list the fields returned for output stops. In addition to these fields, the parameter also includes all the fields from the input feature class used as stops for the analysis.
You can use the attributes from this parameter, such as the Status
field, to determine why a stop was not assigned to any routes.
Show attributes for stops
output parameter
-
ObjectIDinteger
If you specify
preserve
, the value for this field will be a system-generated ID. IfObject I D=false preserve
, the value for this field will be theObject I D= True Object
of your associated input.ID
-
Namestring (length: 500)
The name of the stop visited by the route. The values for this field are copied from the
Name
field on the input stops. -
RouteNamestring (length: 1024)nullable
The name of the route to which the stop is assigned.
Input stops that have the same route name at the time the tool runs are grouped together and visited by one route, and the route is assigned that name. When more than one route name is present on the input stops, the tool can output multiple routes—one for each unique route name.
If no name is present, all the stops belong to the same route.
-
Sequenceinteger
The order in which the stops are visited by the assigned route, which is listed in the
Route
field.Name
-
TimeWindowStartdatetimenullable
The earliest time the route can visit the stop. The values for this field are copied from the
Time
field on the input stops.Window Start
-
TimeWindowEnddatetimenullable
The latest time the route can visit the stop. The values for this field are copied from the
Time
field on the input stops.Window End
-
ArriveCurbApproachintegernullable
The side of the vehicle the curb is on when arriving at the stop.
-
DepartCurbApproachintegernullable
The side of the vehicle the curb is on when departing from the stop.
-
ArriveTimedatetimenullable
The date and time value indicating the arrival time at the stop. The time zone for this time-of-day value is taken from the network element on which the stop is located.
-
DepartTimedatetimenullable
The date and time value indicating the departure time from the stop. The time zone for this time-of-day value is taken from the network element on which the stop is located.
-
ArriveTimeUTCdatetimenullable
The date and time value indicating the arrival time in coordinated universal time (UTC)
-
DepartTimeUTCdatetimenullable
The date and time value indicating the departure time in coordinated universal time (UTC)
-
LocationTypeint enumdefault:0
The stop type. The values for this field are copied from the
Location
field on the input stops.Type
-
SourceIDinteger (non-negative)nullable
The numeric identifier of the network dataset source feature class on which the input point is located.
-
SourceOIDinteger (non-negative)nullable
The object ID of the feature in the source on which the input point is located.
-
PosAlongnumber (non-negative)nullable
The position along the digitized direction of the source line feature. This value is stored as a ratio. This attribute is null if the network location references a junction.
-
SideOfEdgeint enum
Allowed values:
1
,2
The side of the edge in relation to the digitized direction of the line feature.
This attribute is limited to a domain of two values:
1
: Right Side2
: Left Side
-
CurbApproachint enumdefault:0
The direction a vehicle may arrive at and depart from the stop. The values for this field are copied from the
Curb
field on the input stops.Approach
-
Statusint enum
Allowed values:
0
,1
,2
,3
,4
,5
,6
,7
Indicates the status of the point with respect to its location on the network and the outcome of the analysis. The possible values are as following:
0
: OK.The point was located on the network.1
: Not Located. The point was not located on the network and was not included in the analysis.2
: Network element not located. The network element identified by the point's network location fields cannot be found. This can occur when a network element where the point should be was deleted, and the network location was not recalculated.3
: Element not traversable. The network element that the point is located on is not traversable. This can occur when the element is restricted by a restriction attribute.4
: Invalid Field Values. Field values fall outside a range or coded-value domain. For example, a negative number exists where positive numbers are required.5
: Not reached. The point cannot be reached by the solver. The point may be on a separate, disconnected area of the network from the other inputs, or barriers or restrictions prevent travel to or from the point.6
: Time window violation. The point could not be reached within the designated time windows. This status only applies to network analysis types that support time windows.7
: Not located on closest. The closest network location to the point is not traversable because of a restriction or barrier, so the point has been located on the closest traversable network feature instead. If time windows are used and the route arrives early or late, the value changes to 6 (Time window violation)
-
SnapXnumber (non-negative)
The x-coordinate of the position on the network dataset where the point was located, in the coordinate system of the network dataset.
-
SnapYnumber (non-negative)
The y-coordinate of the position on the network dataset where the point was located, in the coordinate system of the network dataset.
-
SnapZnumber (non-negative)
The z-coordinate of the position on the network dataset where the point was located, in the coordinate system of the network dataset. The
Snap
attribute is 0 if the network is two-dimensional.Z -
DistanceToNetworkInMetersnumber (non-negative)
The distance in meters between the point's geographic location and the position where it was located on the network.
-
Attr_[Cost]number (non-negative)default:0
This field specifies how much additional time spent or distance traveled will occur at the stop.
-
Cumul_[Cost]number (non-negative)default:0
This field is the total time, distance, or other travel cost it takes to reach the stop. This includes the travel cost incurred in traveling to the stop, the cost at the stop, and the costs of all the previous stops.
If a route analysis layer determines it takes 10 minutes to visit two stops, and the second stop has an
Attr
value of 5, the_Minutes Cumul
value is 15 minutes._Minutes -
Wait_[Cost]number (non-negative)nullable
This field stores the time spent waiting for the time window to open (
Time
) when the route arrives early at the stop.Window Start -
CumulWait_[Cost]number (non-negative)nullable
This field stores a sum of how much time has been spent waiting for time windows to open (
Time
). It measures idle time. It includes the wait time from the current stop and all previous stops visited by the route.Window Start -
Violation_[Cost]number (non-negative)nullable
This field is a measure of how late the route arrived after the time window closed (
Time
). Specifically, it stores the amount of time between the end of the time window and when the route arrived at the stop.Window End -
CumulViolation_[Cost]number (non-negative)nullable
This field stores the cumulative violation time (
Violation
) from the current stop and all previous stops visited by the route._ [ Cost]
routes
Provides access to the resulting routes.
Show attributes for routes
output parameter
-
ObjectIDinteger
The object ID of the feature.
-
Namestring (length: 1024)
The name of the route based on the
Route
field of the associated stops. If the inputName Route
field is null, the name is derived from theName Name
field of the first and last stops. -
StopCountinteger
The number of stops assigned to the route.
-
StartTimedatetimenullable
The start time of the route, reported in the time zone in which the first stop is located.
-
EndTimedatetimenullable
The end time of the route, reported in the time zone in which the last stop is located.
-
StartTimeUTCdatetimenullable
The start time of the route in coordinated universal time (UTC).
-
EndTimeUTCdatetimenullable
The end time of the route in coordinated universal time (UTC).
-
FirstStopIDinteger
If you specify
preserve
, the value for this field will be a system-generated ID. IfObject I D=false preserve
, the value for this field will be theObject I D= True Object
of your associated input.ID -
LastStopIDinteger
If you specify
preserve
, the value for this field will be a system-generated ID. IfObject I D=false preserve
, the value for this field will be theObject I D= True Object
of your associated input.ID
-
TotalWait_[Cost]number (non-negative)nullable
This field stores the route's overall wait time, which is the time spent at stops waiting for time windows to open. For instance,
Total
, whereWait _Minutes Minutes
is the travel cost for the network. -
TotalViolation_[Cost]number (non-negative)nullable
This field stores the route's overall violation time at stops. Violation time is added when the route arrives at a stop after the time window has ended; it's the difference between the
Arrive
andTime Time
field values on inputs stops.Window End -
Total_[Cost]number (non-negative)nullable
The total distance, time, or other travel cost from the beginning of the first stop to the end of the last stop. The total travel cost and the
Attr
of the visited stops are included in this value._[ Cost] This field will be populated if the
[
part of this field is used as impedance attribute or accumulated attributes.Cost]
barriers
Provides access to points that act as temporary restrictions or represent additional time or distance that may be required to travel on the underlying streets.
Show attributes for barriers
output parameter
-
ObjectIDinteger
If you specify
preserve
, the value for this field will be a system-generated ID. IfObject I D=false preserve
, the value for this field will be theObject I D= True Object
of your associated input.ID -
Namestring (length: 500)
The name of the barrier.
-
SourceIDinteger (non-negative)nullable
The numeric identifier of the network dataset source feature class on which the input point is located.
-
SourceOIDinteger (non-negative)nullable
The object ID of the feature in the source on which the input point is located.
-
PosAlongnumber (non-negative)nullable
The position along the digitized direction of the source line feature. This value is stored as a ratio. This attribute is null if the network location references a junction.
-
SideOfEdgeint enum
Allowed values:
1
,2
The side of the edge in relation to the digitized direction of the line feature.
This attribute is limited to a domain of two values:
1
: Right Side2
: Left Side
-
CurbApproachint enumdefault:0
Allowed values:
0
,1
,2
The direction of traffic that is affected by the barrier. The field value is specified as one of the following integers:
0
: Either side of vehicle. The barrier affects travel over the edge in both directions.1
: Right side of vehicle. Vehicles are only affected if the barrier is on their right side during the approach. Vehicles that traverse the same edge but approach the barrier on their left side are not affected by the barrier.2
: Vehicles are only affected if the barrier is on their left side during the approach. Vehicles that traverse the same edge but approach the barrier on their right side are not affected by the barrier.
-
Statusint enum
Allowed values:
0
,1
,2
,3
,4
,5
,6
,7
Indicates the status of the point with respect to its location on the network and the outcome of the analysis. The possible values are as following:
0
: OK.The point was located on the network.1
: Not Located. The point was not located on the network and was not included in the analysis.2
: Network element not located. The network element identified by the point's network location fields cannot be found. This can occur when a network element where the point should be was deleted, and the network location was not recalculated.3
: Element not traversable. The network element that the point is located on is not traversable. This can occur when the element is restricted by a restriction attribute.4
: Invalid Field Values. Field values fall outside a range or coded-value domain. For example, a negative number exists where positive numbers are required.5
: Not reached. The point cannot be reached by the solver. The point may be on a separate, disconnected area of the network from the other inputs, or barriers or restrictions prevent travel to or from the point.6
: Time window violation. The point could not be reached within the designated time windows. This status only applies to network analysis types that support time windows.7
: Not located on closest. The closest network location to the point is not traversable because of a restriction or barrier, so the point has been located on the closest traversable network feature instead. If time windows are used and the route arrives early or late, the value changes to 6 (Time window violation)
-
FullEdgeint enum
Allowed values:
0
,1
Point barriers are applied to the edge elements during the analysis. The field value is specified as one of the following integers
0
:False. Permits travel on the edge up to the barrier but not through it.1
:True. Restricts travel anywhere on the associated edge.
-
BarrierTypeint enum
Allowed values:
0
,2
Specify whether the point barrier restricts travel completely or adds time or distance when it is crossed. The value for this attribute is specified as one of the following integers:
0
:Restriction. Prohibits travel through the barrier. The barrier is referred to as a restriction point barrier since it acts as a restriction.2
:Added Cost. Traveling through the barrier increases the travel time or distance by the amount specified in theAttr
attribute._[ Cost]
-
Attr_[Cost]number (non-negative)default:0
This attribute is specific to added-cost barriers and is limited to values that are greater than or equal to zero. It indicates how much cost is added when the barrier is traversed.
polylineBarriers
Provides access to one or more lines that prohibit travel anywhere the lines intersect the streets.
Show attributes for polylineBarriers
output parameter
-
ObjectIDinteger
If you specify
preserve
, the value for this field will be a system-generated ID. IfObject I D=false preserve
, the value for this field will be theObject I D= True Object
of your associated input.ID -
Namestring (length: 500)nullable
The name of the barrier.
-
BarrierTypeint enum
Allowed values:
0
,1
Indicates whether the barrier restricts travel completely or scales time or distance when it is crossed. The value for this attribute is specified as one of the following integers:
0
:Restriction. Prohibits travel through the barrier. The barrier is referred to as a restriction point barrier since it acts as a restriction.1
:Scaled Cost. Scales the time or distance required to travel the underlying streets by a factor specified using theAttr
attribute._[ Cost]
-
Attr_[Cost]number (non-negative)
This attribute is specific to scaled-cost barriers. It is the factor by which the cost of edges underlying the barrier are multiplied.
polygonBarriers
Provides access to polygons that either completely restrict travel or proportionately scale the time or distance required to travel on the streets intersected by the polygons.
Show attributes for polygonBarriers
output parameter
-
ObjectIDinteger
If you specify
preserve
, the value for this field will be a system-generated ID. IfObject I D=false preserve
, the value for this field will be theObject I D= True Object
of your associated input.ID -
Namestring (length: 500)nullable
The name of the barrier.
-
BarrierTypeint enum
Allowed values:
0
,1
Indicates whether the barrier restricts travel completely or scales time or distance when it is crossed. The value for this attribute is specified as one of the following integers:
0
:Restriction. Prohibits travel through the barrier. The barrier is referred to as a restriction point barrier since it acts as a restriction.1
:Scaled Cost. Scales the time or distance required to travel the underlying streets by a factor specified using theAttr
attribute._[ Cost]
-
Attr_[Cost]number (non-negative)
This attribute is specific to scaled-cost barriers. It is the factor by which the cost of edges underlying the barrier are multiplied.
traversedEdges
Provides access to the edges that are traversed while solving a network analysis layer.
Show attributes for traversedEdges
output parameter
-
ObjectIDinteger
The system-managed ID field.
-
SourceIDinteger (non-negative)nullable
The numeric identifier of the feature class the traversal element is referencing.
-
SourceOIDinteger (non-negative)nullable
The object ID of the traversed source feature.
-
EIDinteger (non-negative)nullable
The element ID (EID) of the traversed network edge. An
EID
uniquely describes a network element. The EID of a network element is independent of the object ID of the feature. One feature can be stored as many different elements in the network. -
FromPositionintegernullable
Specifies where the output
Route
feature begins in reference to the digitized direction of the underlying street feature.Edges - 0 (zero) indicates that the line begins at the from point of the underlying street feature.
- 1 indicates that the line begins at the to point of the street feature.
- A value between 0 and 1 indicates that the line begins at a point along the underlying street feature; for example, a value of 0.25 means the line begins 25 percent along the digitized direction of the underlying street feature.
-
ToPositionintegernullable
Specifies where the output
Route
feature ends in reference to the digitized direction of the underlying street feature.Edges - 0 indicates that the line ends at the from point of the underlying street feature.
- 1 indicates that the line ends at the to point of the street feature.
- A value between 0 and 1 indicates that the line ends at a point along the underlying street feature; for example, a value of 0.25 means the line ends 25 percent along the digitized direction of the underlying street feature.
-
FromJunctionIDintegernullable
The reference to the object ID of the junction in the
traversed
record set that is coincident with the start of the edge.Junctions -
ToJunctionIDintegernullable
The reference to the object ID of the junction in the
traversed
record set that is coincident with the end of the edge.Junctions -
RouteIDintegernullable
The object ID of the route in the output
routes
record set. -
Attr_[Cost]number (non-negative)
The cost of the underlying edge. The units of this field are the same as the units of the cost attribute referred to in the field name.
This field will be populated if the
[
part of this field is used as an impedance attribute or accumulated attributes.Cost] -
Cumul_[Cost]number (non-negative)
The cumulative cost of the underlying network elements from the beginning of the route to the end of the edge represented by the line feature.
The units of this field are the same as the units of the cost attribute referred to in the field name.
This field will be populated if the
[
part of this field is used as an impedance attribute or accumulated attributes.Cost] -
Attr_[Restriction]int enum
Allowed values:
0
,1
Indicates whether the traversed edge used the restriction attribute referred to in this field's name.
0
—The traversed edge didn't use the restriction.1
—The traversed edge used the restriction.
traversedJunctions
Provides access to the junctions that are traversed while solving a network analysis layer.
Show attributes for traversedJunctions
output parameter
-
ObjectIDinteger
The system-managed ID field.
-
SourceIDinteger (non-negative)nullable
The numeric identifier of the feature class the traversal element is referencing.
-
SourceOIDinteger (non-negative)nullable
The object ID of the traversed source feature.
-
EIDinteger (non-negative)nullable
The element ID (EID) of the traversed network element. An
EID
uniquely describes a network element. The EID of a network element is independent of the object ID of the feature. One feature can be stored as many different elements in the network.EID is -1 if the current record doesn't represent a junction. For example, it is -1 if the record represents a stop on a route.
-
RouteIDintegernullable
The object ID of the route in the output
routes
record set. -
Attr_[Cost]number (non-negative)
The cost of the underlying junction. The units of this field are the same as the units of the cost attribute referred to in the field name.
This field will be populated if the
[
part of this field is used as an impedance attribute or accumulated attributes.Cost] -
Cumul_[Cost]number (non-negative)
The cumulative cost of the underlying network elements from the beginning of the route through the location of the current point feature.
The units of this field are the same as the units of the cost attribute referred to in the field name.
This field will be populated if the
[
part of this field is used as an impedance attribute or accumulated attributes.Cost] -
Attr_[Restriction]int enum
Allowed values:
0
,1
Indicates whether the traversed junction used the restriction attribute referred to in this field's name.
0
—The traversed junction didn't use the restriction.1
—The traversed junction used the restriction.
traversedTurns
Provides access to the turns that are traversed while solving a network analysis layer.
Show attributes for traversedTurns
output parameter
-
ObjectIDinteger
The system-managed ID field.
-
SourceIDinteger (non-negative)nullable
The numeric identifier of the feature class the traversal element is referencing.
-
SourceOIDinteger (non-negative)nullable
The object ID of the traversed source feature.
-
EIDinteger (non-negative)nullable
The element ID (EID) of the traversed network element. An
EID
uniquely describes a network element. The EID of a network element is independent of the object ID of the feature. One feature can be stored as many different elements in the network.EID is -1 if the record represents a traversed global turn.
-
FromEdgeIDintegernullable
The object ID of the edge in the
traversed
record set that is coincident with the turn.Edges -
ToEdgeIDintegernullable
The object ID of the edge in the
traversed
record set that is coincident with the end of the turn.Edges -
RouteIDintegernullable
The object ID of the route in the output
routes
record set. -
Attr_[Cost]number (non-negative)
The cost of the underlying turn. The units of this field are the same as the units of the cost attribute referred to in the field name.
This field will be populated if the
[
part of this field is used as an impedance attribute or accumulated attributes.Cost] -
Cumul_[Cost]number (non-negative)
The cumulative cost of the underlying network elements from the beginning of the route through the location of the current turn.
The units of this field are the same as the units of the cost attribute referred to in the field name.
This field will be populated if the
[
part of this field is used as an impedance attribute or accumulated attributes.Cost] -
Attr_[Restriction]int enum
Allowed values:
0
,1
Indicates whether the traversed turn used the restriction attribute referred to in this field's name.
0
—The traversed turn didn't use the restriction.1
—The traversed turn used the restriction.
directionPoints
Specifies the output turn-by-turn directions for the routes calculated in the analysis, represented as point locations along the routes where specific direction events or maneuvers occur.
Show attributes for directionPoints
output parameter
-
RouteIDintegernullable
The
Object
of the outputID routes
feature with which this direction point is associated. -
Sequenceintegernullable
The sequence of the direction points for the route, starting with 1.
-
DirectionPointTypeintegernullable
The type of direction event or maneuver described by the point, designated by one of the values below:
Show values
- Header (1)
- Arrive (50)
- Depart (51)
- Straight (52)
- On Ferry (100)
- Off Ferry (101)
- Central Fork (102)
- Roundabout (103)
- U-Turn (104)
- Door (150)
- Stairs (151)
- Elevator (152)
- Escalator (153)
- Pedestrian Ramp (154)
- Left Fork (200)
- Left Ramp (201)
- Clockwise Roundabout (202)
- Left-handed U-turn (203)
- Bear left (204)
- Left Turn (205)
- Sharp Left (206)
- Left Turn and immediate Left Turn (207)
- Left Turn and immediate Right Turn (208)
- Right Fork (300)
- Right Ramp (301)
- Counter-Clockwise Roundabout (302)
- Right-handed U-turn (303)
- Bear right (304)
- Right Turn (305)
- Sharp Right (306)
- Right Turn and immediate Left Turn (307)
- Right Turn and immediate Right Turn (308)
- Up Elevator (400)
- Up Escalator (401)
- Up Stairs (402)
- Down Elevator (500)
- Down Escalator (501)
- Down stairs (502)
- General Event (1000)
- Landmark (1001)
- Time Zone Change (1002)
- Traffic Event (1003)
- Scaled Cost Barrier Event (1004)
- Boundary Crossing (1005)
- Restriction Violation (1006)
- Lane (1007)
-
StopIDintegernullable
The
Object
of the stop with which this direction point is associated, if any. If the point does not represent a visit to a stop, the value is null.ID -
DisplayTextstring (length: 1024)nullable
The directions text to display in the consuming application.
-
ArrivalTimedatetimenullable
The time the direction event occurs in coordinated universal time (UTC).
-
ArrivalUTCOffsetnumber (non-negative)nullable
The difference in minutes between the local time at the maneuver location and UTC time shown in the
Arrival
field.Time -
Namestring (length: 1024)nullable
The name of the direction point.
-
ExitNamestringnullable
The highway exit name that appears in the directions instruction.
-
AlternateNamestringnullable
The alternate source name that appears in the directions instruction.
-
IntersectingNamestringnullable
The name of the intersecting or cross street that appears in the directions instruction.
-
BranchNamestringnullable
The signpost branch name that appears in the directions instruction.
-
TowardNamestringnullable
The signpost toward destination name that appears in the directions instruction.
-
Levelintegernullable
The building level at which this direction event occurs. This value corresponds to the
Level
property defined in the network dataset used for the analysis. -
ShortVoiceInstructionstring (length: 1024)nullable
The short text to use as voice guidance text in the consuming application.
-
VoiceInstructionstring (length: 1024)nullable
The additional text, including expanded abbreviations and plurals, to use as voice guidance text in the consuming application.
-
Azimuthnumber (non-negative)nullable
The bearing in degrees of the vehicle departing this point. Zero indicates north.
directionLines
Specifies the output route lines calculated in the analysis sliced to represent each route segment between Direction
events or maneuver locations.
Show attributes for directionLines
output parameter
-
DirectionPointIDintegernullable
The ObjectID value of the feature in the
Direction
table with which this line is associated.Points -
RouteIDintegernullable
The
Object
of the outputID routes
feature with which this direction line is associated. -
DirectionLineTypeintegernullable
The type of direction situation described by this line, designated by one of the following values:
Show values
- Unknown (0)
- Segment (1)
- Maneuver Segment (2)
- Restriction Violation (3)
- Scaled Cost Barrier (4)
- Heavy Traffic (5)
- Slow Traffic (6)
- Moderate Traffic (7)
-
Metersnumber (non-negative)nullable
The length of the line segment measured in meters.
-
Minutesnumber (non-negative)nullable
The travel time along the line segment in minutes.
-
FromLevelintegernullable
The building level at which this direction event begins. This value corresponds to the
Level
property defined in the network dataset used for the analysis. -
ToLevelintegernullable
The building level at which this direction event ends. This value corresponds to the
Level
property defined in the network dataset used for the analysis.
Usage limits
The table below lists the limits that apply to this route service.
Limit description | Limit value |
---|---|
Maximum number of stops | |
Maximum number of (point) barriers | 250 |
Maximum number of street features intersected by polyline barriers | 500 |
Maximum number of street features intersected by polygon barriers | 2,000 |
Maximum straight-line distance for the walking travel mode | 27 miles (43.45 kilometers) |
Force hierarchy beyond a straight-line distance of | 50 miles (80.46 kilometers) |
Maximum time a client can use the service |