The Route service can be used to 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.
Request URL
The Route service supports direct request and job request. You can choose a request type based on the size of the problem you are trying to solve.
To learn more about the direct request, see Direct request documentation.
You can make a job request to the route service using the following form:
https
Request parameters
The route request takes the required and optional parameters listed below. You always need to include values for the required parameters in your requests. The optional parameters have default values that are used when not specified in the request.
Parameter | Description |
---|---|
(Required) | Specify two or more locations between which the route is to be found. Syntax: |
(Required) | Provide the identity of a user who has permissions to access the service. |
(Required) | Specify the response format. Values: |
(Optional) | Specify the mode of transportation for the analysis. Value: JSON object |
(Optional) | Specify the units that will be used to report the total travel time or travel distance for the output routes. The default value is Value: |
(Optional) | Specify the region in which the analysis will be performed. Value: see list |
reorder_stops_to_find_optimal_routes (Optional) | Specify whether the service will reorder stops to find the optimized route. The default value is Values: |
(Optional) | Specify whether the service will preserve the first and last stops when reordering stops. This parameter is required only when The default value is Values: |
(Optional) | Specify whether routes will start and end at the same location. The default value is Values: |
(Optional) | Specify whether the routes will use time windows specified on the input stops. The default value is Values: |
(Optional) | Specify the time zone for the time window values on stops. The default value is Values: |
(Optional) | Specify the time and date the routes will begin |
(Optional) | Specify the time zone of the Values: |
(Optional) | Restrict or permit the analysis to make U-turns at junctions. The default value is Values: |
(Optional) | Specify one or more points to act as temporary restrictions or represent additional time or distance that may be required to travel on the underlying streets. Syntax: |
(Optional) | Specify one or more lines that prohibit travel anywhere the lines intersect the streets. Syntax: |
(Optional) | Specify polygons that either prohibit travel or proportionately scale the time or distance required to travel on the streets intersected by the polygons. Syntax: |
(Optional) | Specify whether hierarchy will be used when finding the shortest paths. The default value is Values: |
(Optional) | Specify the restrictions that will be honored by the service. To learn about the accepted values for this parameter, see the restrictions section below. |
(Optional) | Specify additional values required by an attribute or restriction, such as whether the restriction prohibits, avoids, or prefers travel on restricted roads. To learn about the accepted values for this parameter, see the attribute_parameter_values section below. |
(Optional) | Specify the type of route features that will be output by the service. The default value is Values: |
route_line_simplification_tolerance (Optional) | Specify how much the route geometry returned by the service will be simplified. You can specify the value as in the example below:
|
(Optional) | Specify whether individual edges will be generated for each street along the route. The default value is Values: |
(Optional) | Specify whether the service will generate directions for each route. The default value is Values: |
(Optional) | Specify the language that will be used when generating directions. This parameter applies only when the |
(Optional) | Specify the units for displaying travel distance in the directions. This parameter applies only when the The default value is Values: |
(Optional) | Specify the name of the formatting style for the directions. This parameter applies only when the The default value is Values: |
(Optional) | Specify the impedance. Values: |
(Optional) | Specify whether the service will create a The default value is Values: |
save_output_network_analysis_layer (Optional) | Specify whether the service will save the analysis settings as a network analysis layer file. The default value is Values: |
(Optional) | |
(Optional) | Specify the time-based impedance. The default value is Values: |
(Optional) | Specify the distance-based impedance. The default value is Values: |
(Optional) | Specify the format in which the output features will be created. The default value is Values: |
(Optional) | Specify the spatial reference of the geometries. |
(Optional) | Specify whether invalid input locations will be ignored. The default value is Values: |
(Optional) | Specify settings that affect how inputs are located. Value: JSON object |
Required parameters
The following parameters are required.
stops
Specifies the locations the output route or routes will visit.
The stops
parameter can be specified using a JSON structure that represents a set of point features. The property is optional; however, the JSON structure must specify either the url
or features
property:
-
url
—Specify a REST query request to any ArcGIS Server feature, map, or geoprocessing service that returns a JSON feature set. -
features
—Specify an array of features.Each feature in the
features
array represents a stop and contains the following properties:-
geometry
—Specify the input point geometry containingx
andy
properties along with thespatial
property. If theReference spatial
property is defined for the entire JSON, you don't need to define this property for each geometry. Doing so reduces the size of the input JSON if the input has many features and improves performance. This property is not required if the coordinates are in the default spatial reference, WGS84. If the coordinates are in a different spatial reference, you must specify the spatial reference's well-known ID (WKID). See Using spatial references to look up WKID values.Reference -
attributes
—Specify each attribute as a key-value pair in which the key is the name of a given field, and the value is the attribute value for the corresponding field.
-
Attributes for stops
When specifying the stops using a JSON structure, you can specify additional properties for stops, such as their names, using attributes. The stops
parameter can be specified with the following attributes:
-
Name
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.
-
ID
A unique identifier for the stop. The identifier is included in the output routes (as the
Stop
field) and can help join additional information from the output routes, such as the total travel time or total distance, to attributes from your incidents or vice versa. If theID ID
isn't specified, the service automatically generates a unique identifier for each stop. -
Route
Name 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 You can group up to 150 stops into one route.
-
Sequence
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 -
Additional
Time The amount of time spent at the stop, which is added to the total time of the route. The default value is 0.
The units for this attribute value are specified by the
measurement
parameter. The attribute value is included in the analysis only when the measurement units are time based._units You can account for the extra time it takes at the stop to complete a task, such as to repair an appliance, deliver a package, or inspect the premises.
-
Additional
Distance The extra distance traveled at the stops, which is added to the total distance of the route. The default value is 0.
The units for this attribute value are specified by the
measurement
parameter. The attribute value is included in the analysis only when the measurement units are distance based._units Generally, the location of a stop, such as a home, isn't exactly on the street; it is set back somewhat from the road. This attribute value 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.
-
Additional
Cost The extra cost spent at the stop, which is added to the total cost of the route. The default value is 0.
This attribute value should be used when the travel mode for the analysis uses an impedance attribute that is neither time based nor distance based. The units for the attribute values are interpreted to be in unknown units.
-
Time
Window Start 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 of this analysis, either specified by
impedance
parameter or theimpedance
of the travel mode, is time based, by specifying time-window values the analysis will find a solution that minimizes overall travel and reaches the stop within the prescribed time window.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
use
parameter._time _windows If you specify this attribute, you also need to specify the
Time
attribute.Window End -
Time
Window End 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 impedance attribute of this analysis, either specified by
impedance
parameter or theimpedance
of the travel mode, 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 use
parameter._time _windows 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.
-
Curb
Approach Specify the direction a vehicle can arrive at and depart from the stop.
One of the integers listed in the Coded value column in the following table must be specified as a value of this attribute. The values in the Setting column are the descriptive names for
Curb
attribute values that you may have seen when using the ArcGIS Network Analyst extension software.Approach 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 -
Bearing
The direction in which a point is moving. The units are degrees and are measured clockwise from true north. This field is used in conjunction with the
Bearing
field.Tol 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 field 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 tool determine on which side of the street the point is.
-
Bearing
Tol The bearing tolerance value creates a range of acceptable bearing values when locating moving points on an edge using the
Bearing
field. If theBearing
field 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, and the default value is 30. Values must be greater than 0 and less than 180. 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.
-
Nav
Latency This field is only used in the solve process if the
Bearing
andBearing
fields also have values; however, entering aTol Nav
field value is optional, even when values are present inLatency Bearing
andBearing
.Tol Nav
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.Latency The units of
Nav
are the same as the units of the impedance attribute.Latency
Syntax examples for stops
The following is the syntax for specifying stops using a JSON structure for features:
{
"features": [
{
"geometry": {
"x": <x>,
"y": <y>,
"spatialReference": {
"wkid": <wkid>,
"latestWkid": <wkid>
}
},
"attributes": {
"<field1>": <value11>,
"<field2>": <value12>
}
},
{
"geometry": {
"x": <x>,
"y": <y>,
"spatialReference": {
"wkid": <wkid>,
"latestWkid": <wkid>
}
},
"attributes": {
"<field1>": <value21>,
"<field2>": <value22>
}
}
]
}
The following is the syntax for specifying stops using a URL returning a JSON response:
{
"url": "<url>"
}
Examples for stops
Example 1: Specifying stop geometries and attributes using a JSON structure
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"
}
},
{
"geometry": {
"x": -122.4095,
"y": 37.78379
},
"attributes": {
"Name": "From",
"RouteName": "Route B"
}
},
{
"geometry": {
"x": -122.480,
"y": 37.734
},
"attributes": {
"Name": "To",
"RouteName": "Route B"
}
}
]
}
Example 2: Specifying stop geometries in the Web Mercator spatial reference using a JSON structure
{
"features": [
{
"geometry": {
"x": -13635398.9398,
"y": 4544699.034400001,
"spatialReference": {
"wkid": 102100
}
},
"attributes": {
"Name": "Home",
}
},
{
"geometry": {
"x": -13632733.3441,
"y": 4547651.028300002,
"spatialReference": {
"wkid": 102100
}
},
"attributes": {
"Name": "Office",
}
}
]
}
Example 3: Specifying stops using a URL
The URL makes a query for a few features from a map service. A URL querying features from a feature service can also be specified.
{
"url": "https://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Network/USA/MapServer/1/query?where=1%3D1&outFields=Name,RouteName&f=json"
}
token
Use this parameter to 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.
token=<yourToken>
f
Use this parameter to specify the response format. The parameter can have json
or pjson
as arguments, for example, f=json
. The pjson
value is used for printing the JSON response in a prettified format.
Optional parameters
The following parameters are optional.
travel_mode
Choose the mode of transportation for the analysis.
Travel modes are managed in ArcGIS Online and can be configured by the administrator of your organization to better reflect the organization's workflows.
You must specify the JSON object containing the settings for a travel mode supported by your organization. To get a list of supported travel modes, execute the Get
tool from the Utilities service.
The value for the travel
parameter should be a JSON object representing travel mode settings. When you use the Get
tool from the Utilities service, you get a string representing the travel mode JSON. You need to convert this string to a valid JSON object using your API and then pass the JSON object as the value for the travel
parameter.
For example, below is a string representing the Walking Time travel mode as returned by the Get
tool.
"{\"attributeParameterValues\": [{\"parameterName\": \"Restriction Usage\", \"attributeName\": \"Walking\", \"value\": \"PROHIBITED\"}, {\"parameterName\": \"Restriction Usage\", \"attributeName\": \"Preferred for Pedestrians\", \"value\": \"PREFER_LOW\"}, {\"parameterName\": \"Walking Speed (km/h)\", \"attributeName\": \"WalkTime\", \"value\": 5}], \"description\": \"Follows paths and roads that allow pedestrian traffic and finds solutions that optimize travel time. The walking speed is set to 5 kilometers per hour.\", \"impedanceAttributeName\": \"WalkTime\", \"simplificationToleranceUnits\": \"esriMeters\", \"uturnAtJunctions\": \"esriNFSBAllowBacktrack\", \"restrictionAttributeNames\": [\"Preferred for Pedestrians\", \"Walking\"], \"useHierarchy\": false, \"simplificationTolerance\": 2, \"timeAttributeName\": \"WalkTime\", \"distanceAttributeName\": \"Miles\", \"type\": \"WALK\", \"id\": \"caFAgoThrvUpkFBW\", \"name\": \"Walking Time\"}"
The above value should be converted to a valid JSON object and passed as the value for the travel
parameter.
travel_mode={"attributeParameterValues":[{"parameterName":"Restriction Usage","attributeName":"Walking","value":"PROHIBITED"},{"parameterName":"Restriction Usage","attributeName":"Preferred for Pedestrians","value":"PREFER_LOW"},{"parameterName":"Walking Speed (km/h)","attributeName":"WalkTime","value":5}],"description":"Follows paths and roads that allow pedestrian traffic and finds solutions that optimize travel time. The walking speed is set to 5 kilometers per hour.","impedanceAttributeName":"WalkTime","simplificationToleranceUnits":"esriMeters","uturnAtJunctions":"esriNFSBAllowBacktrack","restrictionAttributeNames":["Preferred for Pedestrians","Walking"],"useHierarchy":false,"simplificationTolerance":2,"timeAttributeName":"WalkTime","distanceAttributeName":"Miles","type":"WALK","id":"caFAgoThrvUpkFBW","name":"Walking Time"}
The default value,Custom
, allows you to configure your own travel mode. When you pass in Custom
, you can set values for the following parameters: impedance
, time
, distance
, uturn
, use
, route
, restrictions
, and attribute
. You can choose Custom
and set the custom travel mode parameters listed above, for example, to model a pedestrian with a fast walking speed or a truck with a given height, weight, and cargo of certain hazardous materials. You can try out different settings to get desired analysis results. Once you have identified the analysis settings, you should work with your organization's administrator and save these settings as part of new or existing travel mode so that everyone in your organization can rerun the analysis with the same settings.
The default values of the custom travel mode parameters model traveling by car. If you specify the travel mode as Custom
or do not provide a value for the travel
parameter, the analysis will be similar to using the default Driving Time
travel mode.
measurement_units
Use this parameter to specify the units that should be used to report the total travel time or travel distance for the output routes. The service determines the shortest path based on travel time or travel distance along the streets depending on whether the units you specify for this parameter are time- or distance-based.
Meters
Kilometers
Feet
Yards
Miles
Nautical
Miles Seconds
Minutes
Hours
Days
The default value is Minutes
.
analysis_region
Specify the region in which to perform the analysis. If a value is not specified for this parameter, the service will automatically calculate the region name based on the location of the input points. Setting the name of the region is recommended to speed up the analysis.
To specify a region, use one of the following values:
- Europe
- Japan
- Korea
- MiddleEastAndAfrica
- NorthAmerica
- SouthAmerica
- SouthAsia
- Thailand
The data coverage page lists the countries that are grouped into each of these regions.
reorder_stops_to_find_optimal_routes
Use this parameter to 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 elect to preserve the first and last stops while allowing the service to reorder intermediary stops by setting thepreserve
parameter._terminal _stops
The default value is false
.
preserve_terminal_stops
When reorder
is true
, you have options to preserve the starting or ending stops and let the tool reorder the rest. The first and last stops are determined by their sequence attribute values or, if the sequence values are null, by the order in which they are listed.
Preserve First
—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.Preserve Last
—The service won't reorder the last stop. The output routes may begin at any stop but must end at the predetermined last stop.Preserve First and Last
—The service won't reorder the first and last stops.Preserve None
—The service may reorder any stop, including the first and last stops. The route may start or end at any of the stop features.
The default value is Preserve First
.
This parameter is ignored when reorder
is false
.
return_to_start
Choose whether routes should start and end at the same location. With this option, you can avoid duplicating the first stop feature and sequencing the duplicate stop at the end of the stop list.
true
—The route should start and end at the first stop feature. Whenreorder
and_stops _to _find _optimal _routes return
are both true,_to _start preserve
must be set to_terminal _stops Preserve First
(which is the default value).false
—The route won't start and end at the first stop feature.
The default value is true
.
use_time_windows
Use this parameter to indicate whether the service will consider time windows specified on the stops when finding the best route. The possible parameter values are true
or false
. The time windows are specified on stops using the Time
and Time
attributes.
The default value is false
.
time_zone_for_time_windows
Use this parameter to specify the time zone for the time window values on stops. The time windows are specified as part of Time
and Time
fields on stops. This parameter is applicable only when the use
parameter is set to true
.
The parameter can be specified using one of the following values:
Geographically Local
—The time window values associated with the stops are in the time zone in which the stops are located. For example, if the stop is located in an area that follows eastern standard time and has time window values of 8:00 a.m. and 10:00 a.m., the time window values will be treated as 8:00 a.m. and 10:00 a.m. in eastern standard time.UTC
—The time window values associated with the stops are in UTC. For example, if the stop is located in an area that follows eastern standard time and has time window values of 8:00 a.m. and 10:00 a.m., the time window values will be treated as 3:00 a.m. and 5:00 a.m. eastern standard time. Specifying the time window values in UTC is useful if you don't know the time zones of the stops but know the absolute time for the time windows (for example, the time window starts an hour from now). The UTC option is applicable only when your network dataset defines a time zone attribute. If your network dataset does not define a time zone attribute, all time window values are always treated as geographically local.
The default value for this parameter is Geographically Local
.
time_of_day
Specify the time and date the routes will begin
Specifying a time of day results in more accurate estimations of travel times because the travel times account for the traffic conditions that are applicable for that date and time.
To use traffic in the analysis, choose a time-based unit for impedance
and assign a value to time
.
If a time of day is not passed in, 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.
The service support two kinds of traffic: live and typical.
If the time
specified is within 4 hours of the current time, live traffic will be used where available. Live traffic retrieves speeds based on phone probe records, sensors, and other data sources and reflects the current travel speeds and predicts speeds for the near future. If the time
specified is earlier than 4 hours or later than 4 hours from the current time, or the road does not have live traffic, typical traffic speeds will be used. Typical speeds are based on historical traffic patterns. The travel time data is aggregated in 15 minute intervals per day of week based on multiple years worth of data. So a road may have a different travel time at Monday at 8 am, Monday at 8:15 am, or Tuesday at 8 am. Since the variance is just at the day of week and time of day, the travel time is the same on a road for any Monday at 8 am, regardless of the month or year.
If your goal is to model typical travel conditions and avoid large variances from the average due to live traffic, it is recommended to use a date from the past to ensure it doesn't coincide with the 4 hour window from the current time. As an extreme example, you can even use dates from 1990.
The Data Coverage page shows the countries Esri currently provides traffic data for.
Typical traffic
To ensure the task uses typical traffic in locations where it is available, choose a time and day of the week; then convert the day of the week to one of the following dates from 1990:
- Monday—1/1/1990
- Tuesday—1/2/1990
- Wednesday—1/3/1990
- Thursday—1/4/1990
- Friday—1/5/1990
- Saturday—1/6/1990
- Sunday—1/7/1990
Set the time and date as UNIX time in milliseconds. For example, to solve for 1:03 p.m. on Thursdays, set the time and date to 1:03 p.m., January 4, 1990, and convert to milliseconds (631458180000
). Although the dates representing days of the week are from 1990, typical traffic is calculated from recent traffic trends—usually over the last two years worth of data.
Live traffic
To use live traffic when and where it is available, choose a time and date and convert to Unix time.
Esri saves live traffic data for 4 hours and references predictive data extending 4 hours into the future. If the time and date you specify for this parameter is outside the 8-hour time window, or the travel time in the analysis continues past the predictive data window, the task falls back to typical traffic speeds.
Examples for time_of_day
Example one: 13:03, January 4, 1990. Typical traffic on Thursdays at 1:03 p.m.
"time_Of_day": 631458180000
Example two: 17:00, January 7, 1990. Typical traffic on Sundays at 5:00 p.m.
"time_Of_day": 631731600000
Example four: 10:20, March 18, 2015. If the current time is between 6:20 a.m., March 18, 2015, and 2:20 p.m., March 18, 2015, live traffic speeds are referenced in the analysis; otherwise, typical traffic speeds are referenced.
"time_Of_day": 1426674000000
time_zone_for_time_of_day
Specify the time zone or zones of the time
parameter. There are two options: Geographically Local
and UTC
.
The default value is Geographically Local
Geographically Local
The time
value refers to the time zone or zones in which the input points are located. This option causes the analysis to have rolling start times across time zones.
Illustration of setting the value to Geographically Local
—Setting time
to 9:00 a.m., January 4, 1990 (631443600000 milliseconds); time
to Geographically Local
; 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: time
is 9:00 a.m., January 4, 1990 (631443600000 milliseconds), and time
is set to Geographically Local
_
UTC
The time
value refers to coordinated universal time (UTC). The start times for all points are simultaneous, regardless of time zones.
Illustration of setting the value to time
—Setting time
to 9:00 a.m., January 4, 1990 (631443600000 milliseconds) and the value to UTC
, 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: time
is 9:00 a.m., January 4, 1990 (631443600000 milliseconds), and time
is set to UTC
_
uturn_at_junctions
Use this parameter 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. 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 |
The default value for this parameter is Allowed only at Intersections and Dead Ends
.
point_barriers
Use this parameter to 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.
You can specify barrier geometries as well as attributes using a more comprehensive JSON structure that references a set of features. The property is optional; however, the JSON structure must specify either the url
or features
property:
-
url
—Specify a REST query request to any ArcGIS Server feature, map, or geoprocessing service that returns a JSON feature set. -
features
—Specify an array of features.Each feature in this array represents a point barrier and contains the following fields:
-
geometry
—Specify the input point geometry containingx
andy
properties along with thespatial
property. If theReference spatial
property is defined for the entire JSON, you don't need to define this property for each geometry. Doing so reduces the size of the input JSON if the input has many features and improves performance. This property is not required if the coordinates are in the default spatial reference, WGS84. If the coordinates are in a different spatial reference, you must specify the spatial reference's well-known ID (WKID). See Using spatial references to look up WKID values.Reference -
attributes
—Specify each attribute as a key-value pair in which the key is the name of a given field, and the value is the attribute value for the corresponding field.
-
Attributes for point_barriers
When specifying point barriers, you can set properties for each, such as its name or barrier type, using the following attributes:
Name
The name of the barrier.
Barrier
Specifies 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 (use the numeric code, not the name in parentheses):
-
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 the
Additional
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.
Additional
The added travel time when the barrier is traversed. This field is applicable only for added-cost barriers and when the measurement
parameter is time-based
This field value must be greater than or equal to zero, and its units are the same as those specified in the measurement
parameter.
Additional
The added distance when the barrier is traversed. This field is applicable only for added-cost barriers and when the measurement
parameter is distance-based
The field value must be greater than or equal to zero, and its units are the same as those specified in the measurement
parameter.
Additional
The added cost when the barrier is traversed. This field is applicable only for added-cost barriers when the impedance attribute is neither time-based nor distance-based.
Full
Specifies how the restriction point barriers are applied to the edge elements during the analysis. The field value is specified as one of the following integers (use the numeric code, not the name in parentheses):
- 0 (False)—Permits travel on the edge up to the barrier but not through it. This is the default value.
- 1 (True)—Restricts travel anywhere on the associated edge.
Curb
Specifies the direction of traffic that is affected by the barrier. The field value is specified as one of the following integers (use the numeric code, not the name in parentheses):
- 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 (Left side of vehicle)—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.
Because junctions are points and don't have a side, barriers on junctions affect all vehicles regardless of the curb approach.
The Curb
attribute works with both types of national driving standards: right-hand traffic (United States) and left-hand traffic (United Kingdom). First, consider a facility 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 a facility from one of two directions, that is, so it ends up on the right or left side of the vehicle. For example, to arrive at a facility and not have a lane of traffic between the vehicle and the facility, choose 1 (Right side of vehicle) in the United States and 2 (Left side of vehicle) in the United Kingdom.
Bearing
The direction in which a point is moving. The units are degrees and are measured clockwise from true north. This field is used in conjunction with the Bearing
field.
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 field 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 tool determine on which side of the street the point is.
Learn more about bearing and bearing tolerance
Bearing
The bearing tolerance value creates a range of acceptable bearing values when locating moving points on an edge using the Bearing
field. If the Bearing
field 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, and the default value is 30. Values must be greater than 0 and less than 180. 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.
Learn more about bearing and bearing tolerance
Nav
This field is only used in the solve process if the Bearing
and Bearing
fields also have values; however, entering a Nav
field value is optional, even when values are present in Bearing
and Bearing
. Nav
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.
The units of Nav
are the same as the units of the impedance attribute.
Syntax examples for point_barriers
Syntax for specifying point
using a JSON structure for features
{
"spatialReference": {
"wkid": <wkid>,
"latestWkid": <wkid>
},
"features": [
{
"geometry": {
"x": <x1>,
"y": <y1>
},
"attributes": {
"<field1>": <value11>,
"<field2>": <value12>
}
},
{
"geometry": {
"x": <x2>,
"y": <y2>
},
"attributes": {
"<field1>": <value21>,
"<field2>": <value22>
}
}
]
}
Syntax for specifying point
using a URL returning a JSON response
{
"url": "<url>"
}
Examples for point_barriers
Example 1: Specifying an added-cost point barrier using JSON structure
This example shows how to use an added-cost point barrier to model a five-minute delay at a railroad crossing. The Barrier
attribute is used to specify the point barrier is added-cost, and the Additional
attribute is used to specify the added delay in minutes.
{
"spatialReference": {
"wkid": 4326
},
"features": [
{
"geometry": {
"x": 37.541479,
"y": -122.053461
},
"attributes": {
"Name": "Haley St railroad crossing",
"BarrierType": 2,
"Additional_Time": 5
}
}
]
}
Example 2: Specifying restriction point barriers in the Web Mercator spatial reference using a JSON structure
This example shows how to use a restriction point barrier to model a road that's blocked by a fallen tree. The barrier's geometry is in the Web Mercator spatial reference and not in the spatial reference of the network dataset.
{
"spatialReference": {
"wkid": 102100
},
"features": [
{
"geometry": {
"y": -13635398.9398,
"x": 4544699.034400001
},
"attributes": {
"Name": "Fallen tree at 123 Main St",
"BarrierType": 0
}
}
]
}
Example 3: Specifying point barriers using a URL
The URL makes a query for a few features from a map service. A URL querying features from a feature service can also be specified.
{
"url": "https://machine.domain.com/webadaptor/rest/services/NetworkAnalysis/SanDiego/MapServer/21/query?where=1%3D1&outFields=Name&f=json"
}
{
"url": "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Network/USA/MapServer/0/query?where=1%3D1&returnGeometry=true&f=json"
}
line_barriers
Use this parameter to 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.
You can specify polyline barrier geometries as well as attributes using a JSON structure that references a set of features. The property is optional; however, the JSON structure must specify either the url
or features
property:
-
url
—Specify a REST query request to any ArcGIS Server feature, map, or geoprocessing service that returns a JSON feature set. -
features
—Specify an array of features.Each feature in this array represents a polyline barrier and contains the following fields:
-
geometry
—Specify the input point geometry containingx
andy
properties along with thespatial
property. If theReference spatial
property is defined for the entire JSON, you don't need to define this property for each geometry. Doing so reduces the size of the input JSON if the input has many features and improves performance. This property is not required if the coordinates are in the default spatial reference, WGS84. If the coordinates are in a different spatial reference, you must specify the spatial reference's well-known ID (WKID). See Using spatial references to look up WKID values.Reference -
attributes
—Specify each attribute as a key-value pair in which the key is the name of a given field, and the value is the attribute value for the corresponding field.
-
Attributes for line_barriers
When specifying the line barriers, you can set name and barrier type properties for each using the following attributes:
-
Name
The name of the barrier.
Syntax examples for line_barriers
Syntax for specifying line barriers using a JSON structure for features
{
"spatialReference": {
"wkid": <wkid>,
"latestWkid": <wkid>,
},
"features": [
{
"geometry": {
"paths": [
[
[<x11>,<y11>],
[<x12>,<y12>]
],
[
[<x21>,<y21>],
[<x22>,<y22>]
]
]
},
"attributes": {
"<field1>": <value11>,
"<field2>": <value12>
}
},
{
"geometry": {
"paths": [
[
[<x11>,<y11>],
[<x12>,<y12>]
],
[
[<x21>,<y21>],
[<x22>,<y22>]
]
},
"attributes": {
"<field1>": <value21>,
"<field2>": <value22>
}
}
]
}
Syntax for specifying line barriers using a URL returning a JSON response
{
"url": "<url>"
}
Examples for line_barriers
Example 1: Specifying line barriers using a JSON structure
The example shows how to add two lines as line barriers to restrict travel on the streets intersected by the lines. Barrier 1 is a single-part line feature made up of two points. Barrier 2 is a two-part line feature whose first part is made up of three points and whose second part is made up of two points.
{
"spatialReference": {
"wkid": 102100
},
"features": [
{
"geometry": {
"paths": [
[
[-10804823.397,3873688.372],
[-10804811.152,3873025.945]
]
]
},
"attributes": {
"Name": "Barrier 1"
}
},
{
"geometry": {
"paths": [
[
[-10804823.397,3873688.372],
[-10804807.813 3873290.911],
[-10804811.152,3873025.945]
],
[
[-10805032.678,3863358.76],
[-10805001.508,3862829.281]
]
]
},
"attributes": {
"Name": "Barrier 2"
}
}
]
}
Example 2: Specifying line barriers using URL
The URL makes a query for a few features from a map service. A URL querying features from a feature service can also be specified.
{
"url": "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Network/USA/MapServer/6/query?where=1%3D1&returnGeometry=true&f=json"
}
polygon_barriers
Use this parameter to specify polygons that either completely restrict travel or proportionately scale the time or distance required to travel on the streets intersected by the polygons.
You can specify polygon barrier geometries as well as attributes using a JSON structure that references a set of features. The property is optional; however, the JSON structure must specify either the url
or features
property:
-
url
—Specify a REST query request to any ArcGIS Server feature, map, or geoprocessing service that returns a JSON feature set. -
features
—Specify an array of features.Each feature in this array represents a polygon barrier and contains the following fields:
-
geometry
—Specify the input point geometry containingx
andy
properties along with thespatial
property. If theReference spatial
property is defined for the entire JSON, you don't need to define this property for each geometry. Doing so reduces the size of the input JSON if the input has many features and improves performance. This property is not required if the coordinates are in the default spatial reference, WGS84. If the coordinates are in a different spatial reference, you must specify the spatial reference's well-known ID (WKID). See Using spatial references to look up WKID values.Reference -
attributes
—Specify each attribute as a key-value pair in which the key is the name of a given field, and the value is the attribute value for the corresponding field.
-
Attributes for polygon_barriers
When specifying the polygon barriers, you can set properties for each, such as its name or barrier type, using the following attributes:
-
Name
The name of the barrier.
-
Barrier
Type Specifies whether the barrier restricts travel completely or scales the cost (such as time or distance) for traveling through it. The field value is specified as one of the following integers (use the numeric code, not the name in parentheses):
-
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.
This is the default value.
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 the
Scaled
orTime Factor Scaled
field. 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.Distance Factor 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.
-
-
Scaled
Time Factor This is the factor by which the travel time of the streets intersected by the barrier is multiplied. The field value must be greater than zero.
This field is applicable only for scaled-cost barriers and when the
measurement
parameter is time-based._units -
Scaled
Distance Factor This is the factor by which the distance of the streets intersected by the barrier is multiplied. The field value must be greater than zero.
This field is applicable only for scaled-cost barriers and when the
measurement
parameter is distance-based._units -
Scaled
Cost Factor This is the factor by which the cost of the streets intersected by the barrier is multiplied. The field value must be greater than zero.
This field is applicable only for scaled-cost barriers when the impedance is neither time-based nor distance-based .
Syntax examples for polygon_barriers
Syntax for specifying polygon barriers using a JSON structure for features
{
"spatialReference": {
"wkid": <wkid>,
"latestWkid": <wkid>
}
"features": [
{
"geometry": {
"rings": [
[
[<x11>,<y11>],
[<x12>,<y12>],
[<x11>,<y11>]
],
[
[<x21>,<y21>],
[<x22>,<y22>]
[<x21>,<y21>]
]
]
},
"attributes": {
"<field1>": <value11>,
"<field2>": <value12>
}
},
{
"geometry": {
"rings": [
[
[<x11>,<y11>],
[<x12>,<y12>],
[<x11>,<y11>]
],
[
[<x21>,<y21>],
[<x22>,<y22>],
[<x21>,<y21>]
]
]
},
"attributes": {
"<field1>": <value21>,
"<field2>": <value22>
}
}
]
}
Syntax for specifying polygon barriers using a URL returning a JSON response
{
"url": "<url>"
}
Examples for polygon_barriers
Example 1: Specifying polygon barriers using a JSON structure.
The example shows how to add two polygons as barriers. The first polygon named Flood zone
is a restriction polygon barrier that prohibits travel on the underlying streets. The polygon is a single-part polygon feature made up of four points. The second polygon named Severe weather zone
is a scaled-cost polygon barrier that increases the travel time on underlying streets to one third of the original value. The polygon is a two-part polygon feature. Both parts are made up 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
}
},
{
"geometry": {
"rings": [
[
[-97.0803,32.8235],
[-97.0776,32.8277],
[-97.074,32.8254],
[-97.0767,32.8227],
[-97.0803,32.8235]
],
[
[-97.0871,32.8311],
[-97.0831,32.8292],
[-97.0853,32.8259],
[-97.0892,32.8279],
[-97.0871,32.8311]
]
]
},
"attributes": {
"Name": "Severe weather zone",
"BarrierType": 1,
"ScaledTimeFactor": 3
}
}
]
}
Example 2: Specifying a polygon barrier using a URL
The URL makes a query for a few features from a map service. A URL querying features from a feature service can also be specified.
{
"url": "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Network/USA/MapServer/7/query?where=1%3D1&returnGeometry=true&f=json"
}
use_hierarchy
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.
The default value is true
restrictions
Use this parameter to specify the restrictions that 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 none indicates that no restrictions will be used when finding the shortest paths.
The service supports the following restriction names:
- 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.
The restrictions parameter value is specified as a list of restriction names. A value of null
indicates that no restrictions should be used when finding the best route, but only when travel
is set to Custom
.
Example for restrictions
restrictions=[Driving a Truck, Height Restriction, Length Restriction]
attribute_parameter_values
Use this parameter to 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.
You can specify attribute
parameter using JSON structure that represents a set of features. The JSON structure can include the following properties:
-
features
—Specify an array of features.-
geometry
—Specify the input point geometry containingx
andy
properties along with thespatial
property. If theReference spatial
property is defined for the entire JSON, you don't need to define this property for each geometry. Doing so reduces the size of the input JSON if the input has many features and improves performance. This property is not required if the coordinates are in the default spatial reference, WGS84. If the coordinates are in a different spatial reference, you must specify the spatial reference's well-known ID (WKID). See Using spatial references to look up WKID values.Reference -
attributes
—Specify each attribute as a key-value pair in which the key is the name of a given field, and the value is the attribute value for the corresponding field.
-
-
url
—Specify a REST query request to any ArcGIS Server feature, map, or geoprocessing service that returns a JSON feature set.
Each feature in the features array represents an attribute parameter and contains the following fields:
attributes
—Specify each attribute as a key-value pair in which the key is the name of a given field, and the value is the attribute value for the corresponding field.
Attributes for attribute_parameter_values
The attribute
parameter can be specified with the following attributes:
Attribute
—The name of the restriction.Name Parameter
—The name of the parameter associated with the restriction. A restriction can have one or moreName Parameter
values based on its intended use, which implies you may need multipleName attribute
parameters for a single attribute name._parameter _values Parameter
—The value for theValue Parameter
that is used by the service when evaluating the restriction.Name
When specifying the attribute
parameter, 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 Restriction Usage
Parameter
can be assigned any of the following string values or their equivalent numeric values listed within 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.
The following table lists the restriction names and the default restriction parameter values for all the restrictions. The default value for the attribute
parameter is the JSON structure containing all the rows from the below table.
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 |
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 |
Vehicle Height (meters) | 0 | |
Kingpin to Rear Axle Length Restriction | Restriction Usage | Prohibited |
Vehicle Kingpin to Rear Axle Length (meters) | 0 | |
Length Restriction | Restriction Usage | Prohibited |
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 |
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 |
Vehicle Weight (kilograms) | 0 | |
Weight per Axle Restriction | Restriction Usage | Prohibited |
Vehicle Weight per Axle (kilograms) | 0 | |
Width Restriction | Restriction Usage | Prohibited |
Vehicle Width (meters) | 0 |
Syntax example for attribute_parameter_values
{
"features": [
{
"attributes": {
"<field1>": <value11>,
"<field2>": <value12>,
"<field3>": <value13>
}
},
{
"attributes": {
"<field1>": <value21>,
"<field2>": <value22>,
"<field3>": <value13>
}
}
]
}
Examples for attribute_parameter_values
This example shows how to specify the height and weight of the vehicle for use with the height and weight restrictions respectively along with a high preference to include designated truck routes. This results in a route that does not include any roads where the clearance under overpasses or through tunnels is less than the vehicle height. The results will also not include any roads with load limited bridges or local roads that prohibit heavy vehicles if the vehicle weight exceeds the maximum permissible weight. However, the route will include as many roads as possible that are designated as preferred truck routes.
Note that the Restriction Usage
Parameter
for the Height Restriction
and the Weight Restriction
restrictions are not specified since we want to use the default value of PROHIBITED
for these restriction parameters.
attribute_parameter_values=
{
"features": [
{
"attributes": {
"AttributeName": "Height Restriction",
"ParameterName": "Vehicle Height (meters)",
"ParameterValue": 4.12
}
},
{
"attributes": {
"AttributeName": "Weight Restriction",
"ParameterName": "Vehicle Weight (kilograms)",
"ParameterValue": 36287
}
},
{
"attributes": {
"AttributeName": "Use Preferred Truck Routes",
"ParameterName": "Restriction Usage",
"ParameterValue": "PREFER_HIGH"
}
}
]
}
route_shape
Use this parameter to specify the type of route features that are output by the service. The parameter can be specified using one of the following values:
True Shape
—Return the exact shape of the resulting route that is based on the underlying streets. Since this option creates the most detailed geometry for the output routes, choosing it tends to make the process run longer and create larger output files.True Shape with Measures
—Return the exact shape of the resulting route that is based on the underlying streets. Additionally, construct measures so the shape may be used in linear referencing. The measurements increase from the first stop and record the cumulative travel time or travel distance in the units specified by themeasurement
parameter._units Straight Line
—Return a straight line between the route start and end.None
—Do not return any route shapes. This value can be useful in cases where you want to optimize performance and are only interested in determining the route's total travel time or travel distance, but not the route paths.
The default value is True Shape
.
When the route
parameter is set to True Shape
, or True Shape with Measure
, the generalization of the route shape can be further controlled using the appropriate value for the route
parameter.
No matter which value you choose for the route
parameter, the best route is always determined by minimizing the travel time or the travel distance, never using the straight-line distance between stops. This means that only the route shapes are different, not the underlying streets that are searched when finding the route.
route_line_simplification_tolerance
Use this parameter to specify by how much you want to simplify 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 parameter is specified as a JSON structure that includes the following properties:
distance
—The simplification distance value.units
—The units for the simplification distance value. The property value should be specified as one of the following values:esri
, andCentimeters, esri Decimal Degrees, esri Decimeters, esri Feet, esri Inches, esri Kilometers, esri Meters, esri Miles, esri Millimeters, esri Nautical Miles, esri Points esri
.Yards
The default value for the route
parameter is 10 meters.
Syntax example for route_line_simplification_tolerance
{
"distance": <value>,
"units": "<unit>"
}
Example for route_line_simplification_tolerance
{
"distance": 10,
"units": "esriMeters"
}
populate_route_edges
Use this parameter to specify whether the tool should generate edges for each route. Route edges represent the individual street features or other similar features, such as trails, that are traversed by a route. The output route edges is commonly used to see which streets are traveled on the most or least by the resultant routes.
true
—Generate route edges.false
—Don't generate route edges. This is the default value.
populate_directions
Use this parameter to specify whether the service should generate driving directions for each route.
true
—Generate directions. The directions are configured based on the values for thedirections
,_language directions
, and_style _name directions
parameters._distance _units false
—Don't generate directions. The service returns an empty value for thefeatures
property within theoutput
output parameter._directions
directions_language
The language that will be used when generating travel directions.
This parameter applies only when the populate
parameter is set to true
. 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 tries to find an exact match for the specified language including any language localization. If an exact match is not found, it tries to match the language family. If a match is still not found, the service returns the directions using the default language, English. For example, if the directions language is specified as es-
(Mexican Spanish), the service will return the directions in Spanish as it supports es
language code and not es-
.
directions_distance_units
Specify the units for displaying travel distance in the driving directions. This parameter is used only when the populate
parameter is set to true
. The parameter can be specified using one of the following values:
Miles
Kilometers
Meters
Feet
Yards
Nautical
Miles
The default value is Miles
.
directions_style_name
Specify the name of the formatting style for the directions. The 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
The default value is N
.
This parameter applies only when the populate
parameter is set to true
.
impedance
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 impedance
parameter can be specified using the following values:
- TravelTime—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 using TravelTime, 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.
- Minutes—Live traffic data is not used, but historical average speeds for automobiles data is used.
- TruckTravelTime—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 using TruckTravelTime, 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.
- TruckMinutes—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.
- WalkTime—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.
- 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.
If you choose a time-based impedance, such as Travel
, Truck
, Minutes
, Truck
, or Walk
, the measurement
parameter must be set to a time-based value; if you choose a distance-based impedance such as Miles
, Kilometers
, the measurement
must be distance-based.
save_route_data
Use this parameter to specify whether the service should create a zip file that contains a file geodatabase holding the inputs and outputs of the analysis in a format that can be used to share route layers with your portal.
true
—Saves route data. The route data zip file can be downloaded from the URL provided as part of theoutput
parameter._route _data false
—Don't save route data.
The default value is false
.
save_output_network_analysis_layer
Use this parameter to specify if the service should save the analysis settings as a network analysis layer file. You cannot directly work with this file even when you open the file in an ArcGIS Desktop application like ArcGIS Pro. It is meant to be sent to Esri Technical Support in order to diagnose the quality of results returned from the service.
true
—Saves network analysis layer file. The file can be downloaded from the URL provided as part of theoutput
parameter._network _analysis _layer false
—Don't save network analysis layer file.
The default value is false
.
overrides
time_impedance
The time-based impedance value represents the travel time along road segments or on other parts of the transportation network.
Minutes
Travel
Time Walk
Time Truck
Minutes Truck
Travel Time
distance_impedance
The distance-based impedance value represents the travel distance along road segments or on other parts of the transportation network.
Miles
Kilometers
output_format
Specifies the format in which the output features will be returned.
- Feature Set—The output features will be returned as feature classes and tables. This is the default.
- JSON File—The output features will be returned as a compressed file containing the JSON representation of the outputs. When this option is specified, the output is a single file (with a
.zip
extension) that contains one or more JSON files (with a.json
extension) for each of the outputs created by the service. - GeoJSON File—The output features will be returned as a compressed file containing the GeoJSON representation of the outputs. When this option is specified, the output is a single file (with a
.zip
extension) that contains one or more GeoJSON files (with a.geojson
extension) for each of the outputs created by the service.
env:outSR
Use this parameter to specify the spatial reference of the geometries, such as line or point features, returned by the service.
The parameter value can be specified as a well-known ID (WKID) for the spatial reference. See Using spatial references to look up WKID values.
Many of the basemaps provided by ArcGIS Online are in the Web Mercator spatial reference (WKID 102100). Specifying env
returns the geometries in the Web Mercator spatial reference, which can be drawn on top of the basemaps.
ignore_invalid_locations
Specifies 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 nontraversable 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. This is the default.
-
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.
locate_settings
Use this parameter to 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.
Learn more about locating inputs
The default value is as follows:
{
"default": {
"tolerance": 20000,
"toleranceUnits": "esriMeters",
"allowAutoRelocate": true,
"sources": [
{
"name": "main.Routing_Streets"
}
]
}
}
The locator JSON object has following properties:
-
tolerance
andtolerance
—Allows you to control the maximum search distance when locating inputs. If no valid network location is found within this distance, the input features will be considered unlocated. A small search tolerance decreases the likelihood of locating on the wrong street but increases the likelihood of not finding any valid network location. TheUnits tolerance
parameter value can be specified as one of the following values:Units esri
Centimeters esri
Decimal Degrees esri
Decimeters esri
Feet esri
Inches esri
Int Feet esri
Int Inches esri
Int Miles esri
Int Nautical Miles esri
Int Yards esri
Kilometers esri
Meters esri
Miles esri
Millimeters esri
Nautical Miles esri
Yards
-
sources
— Allows you to control which network source can be used for locating. For example, you can configure the analysis to locate inputs on streets but not on sidewalks. The list of possible sources on which to locate is specific to the network dataset this service references. Only the sources that are present in the sources array are used for locating. Sources is specified as an array of objects each having the following property:name
—The name of the network source feature class that can be used for locating inputs
-
allow
—Allows you to control whether inputs with existing network location fields can be automatically relocated when solving to ensure valid, routable location fields for the analysis. If the value isAuto Relocate true
, points located on restricted network elements and points affected by barriers will be relocated to the closest routable location. If the value isfalse
, network location fields will be used as is even if the points are unreachable, and this may cause the solve to fail. Even if the value isfalse
, inputs with no location fields or incomplete location fields will be located during the solve operation.
The parameter value is specified as a JSON object. The JSON object allows you to specify a locator JSON for all input feature in the analysis, or you can specify an override for a particular input. The override allows you to have different settings for each analysis input. When specifying the locate
JSON, you must provide all the properties including tolerance
, tolerance
, sources
, and allow
in the default locator JSON object. If you need to provide a different locator JSON for a particular input class, you must include the overrides property for that input. The property name must match the input parameter name. The locator JSON for a particular input doesn't need to include all the properties; you only need to include the properties that are different from the default locator JSON properties.
Syntax for locate_settings
Syntax for specifying locate
using JSON structure.
{
"default": {
"tolerance": <value>,
"toleranceUnits": "<unit>",
"allowAutoRelocate": true | false,
"sources": [{
"name": "<sourceName>"
}]
},
"overrides": {
"stops": {
"tolerance": <value>,
"toleranceUnits": "<unit>",
"allowAutoRelocate": true | false,
"sources": [{
"name": "<sourceName>"
}]
},
"point_barriers": {
"tolerance": <value>,
"toleranceUnits": "<unit>",
"allowAutoRelocate": true | false,
"sources": [{
"name": "<sourceName>"
}]
},
"line_barriers": {
"allowAutoRelocate": true | false,
"sources": [{
"name": "<sourceName>"
}]
},
"polygon_barriers": {
"allowAutoRelocate": true | false,
"sources": [{
"name": "<sourceName>"
}]
}
}
}
Example for locate_settings
Example 1: Specify default locate settings using JSON structure
This example shows how to specify locate settings so inputs are located within 500 meters of the specified location. A small search tolerance like this can be valuable 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": "main.Routing_Streets"
}
]
}
}
JSON response
When you submit a request, the service assigns a unique job ID for the transaction. The job ID and the status of the job are returned in the response.
{
"jobId": <jobID>,
"jobStatus": <jobStatus>
}
The job
property can have the following values:
- esriJobSubmitted
- esriJobWaiting
- esriJobExecuting
- esriJobSucceeded
- esriJobFailed
- esriJobTimedOut
- esriJobCancelling
- esriJobCancelled
You can use the job ID to periodically check the status of the job and messages. Additionally, if the job has successfully completed, you can use the job ID to retrieve the results or even the inputs. The job information and results remain available for 24 hours after the job is done.
After the initial request is submitted, you can make a request of the following form to get the status of the job:
https
{
"jobId": "<jobId>",
"jobStatus": "<jobStatus>",
"messages": [
{
"type": "<type1>",
"description": "<description1>"
},
{
"type": "<type2>",
"description": "<description2>"
}
]
}
While a job is executing, you can cancel it by making a request of the form:
https
When you submit your request, if the service is busy processing other requests, the job will wait in the queue. The job status will be reported as esri
. If your application cannot wait for the entire duration while the job is in the queue, you can cancel the request and submit it at a later time. A canceled request will not incur any service credits. However, if your application did not cancel the request, it will eventually execute and will incur service credits irrespective of whether your application retrieved the results or ignored them. Therefore, your application should always cancel the request if required.
After the successful completion of the job, you can retrieve a specific output by making a request of the following form:
https
Instead of retrieving outputs individually, you can make a request of the following form to retrieve all the outputs.
https
Refer to the Output parameters section for more information on how to interpret the solution provided by the service.
The feature geometries are returned by default in the WG
spatial reference. You can get the feature geometries in any spatial reference by specifying the out
parameter when retrieving an output parameter or all the output parameters.
The below example shows how to retrieve an output parameter with feature geometries in Web Mercator (
spatial reference.
https
The below example shows how to retrieve all the output parameters with feature geometries in Web Mercator (WKID: 102100) spatial reference.
https
The below example shows how to retrieve the value for an input parameter by making the requests of the following form:
https
The below example shows how to retrieve all the inputs by making the request of the following form.
https
Output parameters
Upon successful execution, the service returns the best paths between the stops and the status indicating if the analysis was successful using the following output parameters.
output_routes
This provides access to the resulting routes.
The following table lists the fields returned for output routes:
Field | Description |
---|---|
| The name of the route is based on the |
| The number of stops assigned to the route. |
| The start time of the route, reported in the time zone in which the first stop is located. |
| The end time of the route, reported in the time zone in which the last stop is located. |
| The start time of the route in coordinated universal time (UTC). |
| The end time of the route in coordinated universal time (UTC). |
| The cumulative travel time in minutes from the beginning of the first stop to the end of the last stop for a route. This includes any |
| The cumulative travel distance in miles from the beginning of the first stop to the end of the last stop for a route. This includes any |
| The cumulative travel distance in kilometers from the beginning of the first stop to the end of the last stop for a route. This includes any |
| The cumulative travel cost in unknown units from the beginning of the first stop to the end of the last stop for a route. This includes any This field is included only when the travel mode used for the analysis has an impedance attribute that is neither time based nor distance based. |
| This field stores the route's overall wait time, which is the time spent at stops waiting for time windows to open. The field has a null value if time windows are not used in the analysis. |
| 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 The field has a null value if time windows are not used in the analysis. Additional fields, |
| The |
| The |
The output
parameter is returned as a JSON feature set with following syntax:
{
"paramName": "Output_Routes",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPolyline",
"spatialReference": {
"wkid": <wkid>,
"latestWkid": <wkid>,
},
"fields": [
{
"name": "<field1Name>",
"type": "<field1Type>",
"alias": "<field1Alias>",
"length": "<field1Length>" //length is included only for esriFieldTypeString
},
{
"name": "<field2Name>",
"type": "<field2Type>",
"alias": "<field2Alias>",
"length": "<field2Length>"
}
],
"features": [
{
"geometry": {
"paths": [
[
[
<x11>,
<y11>
],
[
<x12>,
<y12>
]
],
[
[
<x21>,
<y21>
],
[
<x22>,
<y22>
]
]
]
},
"attributes": {
"<field1>": <value11>,
"<field2>": <value12>
}
},
{
"geometry": {
"paths": [
[
[
<x11>,
<y11>
],
[
<x12>,
<y12>
]
],
[
[
<x21>,
<y21>
],
[
<x22>,
<y22>
]
]
]
},
"attributes": {
"<field1>": <value21>,
"<field2>": <value22>
}
}
],
"exceededTransferLimit": <true|false>
}
}
The following shows an example of the output
parameter.
{
"paramName": "Output_Routes",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPolyline",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"fields": [
{
"name": "OID",
"type": "esriFieldTypeOID",
"alias": "OID"
},
{
"name": "Name",
"type": "esriFieldTypeString",
"alias": "Name",
"length": 260
},
{
"name": "StopCount",
"type": "esriFieldTypeInteger",
"alias": "StopCount",
"domain": {
"type": "range",
"name": "StopCount",
"range": [
0,
2147483647
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDefaultValue"
}
},
{
"name": "Total_Minutes",
"type": "esriFieldTypeDouble",
"alias": "Total_Minutes"
},
{
"name": "Total_Kilometers",
"type": "esriFieldTypeDouble",
"alias": "Total_Kilometers"
},
{
"name": "FirstStopOID",
"type": "esriFieldTypeInteger",
"alias": "FirstStopOID"
},
{
"name": "LastStopOID",
"type": "esriFieldTypeInteger",
"alias": "LastStopOID"
},
{
"name": "Total_Miles",
"type": "esriFieldTypeDouble",
"alias": "Total_Miles"
},
{
"name": "Shape_Length",
"type": "esriFieldTypeDouble",
"alias": "Shape_Length"
}
],
"features": [
{
"attributes": {
"OID": 1,
"Name": "Stop1 - Stop2",
"StopCount": 2,
"Total_Minutes": 14.296418563584401,
"Total_Kilometers": 8.6253749504299684,
"FirstStopOID": 1,
"LastStopOID": 2,
"Total_Miles": 5.3595600000000001,
"Shape_Length": 0.08518273838097945
},
"geometry": {
"paths": [
[
[
145.06591391900008,
-37.864739829999962
],
[
145.0671000000001,
-37.865289999999959
],
....
.... additional points in the route part
....
]
]
}
},
{
"attributes": {
"OID": 2,
"Name": "Stop3 - Stop4",
"StopCount": 2,
"Total_Minutes": 16.896418563584401,
"Total_Kilometers": 15.9853749504299684,
"FirstStopOID": 3,
"LastStopOID": 4,
"Total_Miles": 9.9895600000000001,
"Shape_Length": 0.08590273838097945
},
"geometry": {
"paths": [
[
[
145.496098061475,
-37.75135883264409
],
[
145.45440000035967,
-37.75123999982617
],
....
.... additional points in the route part
....
]
]
}
}
],
"exceededTransferLimit": false
}
}
output_directions
This provides access to the turn-by-turn directions for each resulting route.
The directions
, directions
, and directions
parameters highly influence the driving directions. The features are empty if the populate
parameter is false.
The following table lists the fields that are returned for output directions:
Field | Description |
---|---|
| The name of the route to which the driving action applies. This value is the same as the |
| The time of day to initiate the given driving action. If the route spans multiple days, the date and time of day are displayed. |
| The type of maneuver that the directions feature represents or the type of the directions text. To determine whether
The Maneuver Types
Directions String Types
|
| Specifies whether the
|
| A text description of the travel directions. |
| The time elapsed in minutes from when the current driving direction starts until the next one starts, or until the route ends for the last driving direction. |
| The distance from where the current driving direction occurs to where the next one occurs, or to where the route ends for the last driving direction. The value is in the units specified by the This value is zero for driving directions that occur at the same location where the next one begins. For example, the |
The output
parameter is returned as a JSON feature set with following syntax:
{
"paramName": "Output_Directions",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPolyline",
"spatialReference": {
"wkid": <wkid>,
"latestWkid": <wkid>,
},
"fields": [
{
"name": "<field1Name>",
"type": "<field1Type>",
"alias": "<field1Alias>",
"length": "<field1Length>" //length is included only for esriFieldTypeString
},
{
"name": "<field2Name>",
"type": "<field2Type>",
"alias": "<field2Alias>",
"length": "<field2Length>"
}
],
"features": [
{
"geometry": {
"paths": [
[
[
<x11>,
<y11>
],
[
<x12>,
<y12>
]
],
[
[
<x21>,
<y21>
],
[
<x22>,
<y22>
]
]
]
},
"attributes": {
"<field1>": <value11>,
"<field2>": <value12>
}
},
{
"geometry": {
"paths": [
[
[
<x11>,
<y11>
],
[
<x12>,
<y12>
]
],
[
[
<x21>,
<y21>
],
[
<x22>,
<y22>
]
]
]
},
"attributes": {
"<field1>": <value21>,
"<field2>": <value22>
}
}
],
"exceededTransferLimit": <true|false>
}
}
The following shows an example of the output
parameter:
{
"paramName": "Output_Directions",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPolyline",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"fields": [
{
"name": "ObjectID",
"type": "esriFieldTypeOID",
"alias": "ObjectID"
},
{
"name": "RouteName",
"type": "esriFieldTypeString",
"alias": "RouteName",
"length": 128
},
{
"name": "ArriveTime",
"type": "esriFieldTypeDate",
"alias": "ArriveTime",
"length": 16
},
{
"name": "Type",
"type": "esriFieldTypeSmallInteger",
"alias": "Type"
},
{
"name": "SubItemType",
"type": "esriFieldTypeSmallInteger",
"alias": "SubItemType"
},
{
"name": "Text",
"type": "esriFieldTypeString",
"alias": "Text",
"length": 255
},
{
"name": "ElapsedTime",
"type": "esriFieldTypeSingle",
"alias": "ElapsedTime"
},
{
"name": "DriveDistance",
"type": "esriFieldTypeSingle",
"alias": "DriveDistance"
},
{
"name": "Shape_Length",
"type": "esriFieldTypeDouble",
"alias": "Shape_Length"
}
],
"features": [
{
"attributes": {
"ObjectID": 1,
"RouteName": "Stop1 - Stop2",
"ArriveTime": -2209161600000,
"Type": 18,
"SubItemType": 1,
"Text": "Start at Stop1",
"ElapsedTime": 0,
"DriveDistance": 0,
"Shape_Length": 0
}
},
{
"attributes": {
"ObjectID": 2,
"RouteName": "Stop1 - Stop2",
"ArriveTime": -2209161600000,
"Type": 2,
"SubItemType": 1,
"Text": "Go southeast on Francis Cres toward Albion Rd",
"ElapsedTime": 0.3060721,
"DriveDistance": 7.480023E-02,
"Shape_Length": 0.001307468992936962
},
"geometry": {
"paths": [
[
[
145.06591391900008,
-37.864739829999962
],
[
145.0671000000001,
-37.865289999999959
],
....
.... additional points in the route path
....
]
]
}
},
....
.... additional directions features
....
{
"attributes": {
"ObjectID": 15,
"RouteName": "Stop1 - Stop2",
"ArriveTime": -2209161600000,
"Type": 1,
"SubItemType": 1,
"Text": "Finish at Stop2, on the left",
"ElapsedTime": 0,
"DriveDistance": 0,
"Shape_Length": 0
}
},
....
.... additional directions features
....
{
"attributes": {
"ObjectID": 9,
"RouteName": "Station 20 - Fire Incident",
"ArriveTime": 1365637766665,
"Type": 1,
"SubItemType": 1,
"Text": "Finish at Fire Incident",
"ElapsedTime": 0,
"DriveDistance": 0,
"Shape_Length": 0
}
}
],
"exceededTransferLimit": false
}
}
output_direction_points
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.
Field name | Description |
---|---|
| The ObjectID of the output |
| The sequence of the direction points for the route, starting with 1. |
| The type of direction event or maneuver described by the point, designated by one of the values below.
|
| The ObjectID 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. |
| The directions text to display in the consuming application. |
| The time the direction event occurs. in coordinated universal time (UTC). |
| The difference in minutes between the local time at the maneuver location and UTC time shown in the |
| The name of the direction point. |
| The highway exit name that appears in the directions instruction. |
| The alternate source name that appears in the directions instruction. |
| The name of the intersecting or cross street that appears in the directions instruction. |
| The signpost branch name that appears in the directions instruction. |
| The signpost toward destination name that appears in the directions instruction. |
| The building level at which this direction event occurs. This value corresponds to the |
| The short text to use as voice guidance text in the consuming application. |
| The additional text, including expanded abbreviations and plurals, to use as voice guidance text in the consuming application. |
| The bearing in degrees of the vehicle departing this point. Zero indicates north. |
Syntax example for output_direction_points
The output
parameter is returned as a JSON feature set with the following syntax:
{
"paramName": "output_direction_points",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPoint",
"spatialReference": {
"wkid": <wkid>,
"latestWkid": <wkid>
},
"fields": [
{
"name": "<field1Name>",
"type": "<field1Type>",
"alias": "<field1Alias>",
"length": "<field1Length>"
},
{
"name": "<field2Name>",
"type": "<field2Type>",
"alias": "<field2Alias>",
"length": "<field2Length>"
}
],
"features": [
{
"attributes": {
"<field1>": <value11>,
"<field2>": <value12>
},
"geometry": {
"x": <x11>,
"y": <y11>
}
},
{
"attributes": {
"<field1>": <value21>,
"<field2>": <value22>
},
"geometry": {
"x": <x21>,
"y": <y21>
}
],
"exceededTransferLimit": <true|false>
}
}
}
Example for output_direction_points
The following shows an example of the output
parameter:
{
"paramName": "output_direction_points",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPoint",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"fields": [{
"name": "ObjectID",
"type": "esriFieldTypeOID",
"alias": "ObjectID"
},
{
"name": "RouteID",
"type": "esriFieldTypeInteger",
"alias": "Route ID"
},
{
"name": "Sequence",
"type": "esriFieldTypeInteger",
"alias": "Sequence"
},
{
"name": "DirectionPointType",
"type": "esriFieldTypeInteger",
"alias": "Direction Point Type"
},
{
"name": "StopID",
"type": "esriFieldTypeInteger",
"alias": "Stop ID"
},
{
"name": "DisplayText",
"type": "esriFieldTypeString",
"alias": "Display Text",
"length": 1024
},
{
"name": "ArrivalTime",
"type": "esriFieldTypeDate",
"alias": "Arrival Time"
},
{
"name": "ArrivalUTCOffset",
"type": "esriFieldTypeDouble",
"alias": "Arrival Time: Offset from UTC in Minutes"
},
{
"name": "Name",
"type": "esriFieldTypeString",
"alias": "Primary Name",
"length": 1024
},
{
"name": "ExitName",
"type": "esriFieldTypeString",
"alias": "Highway Exit Name"
},
{
"name": "AlternateName",
"type": "esriFieldTypeString",
"alias": "Alternate Name"
},
{
"name": "IntersectingName",
"type": "esriFieldTypeString",
"alias": "Intersecting Name"
},
{
"name": "BranchName",
"type": "esriFieldTypeString",
"alias": "Signpost Branch Name"
},
{
"name": "TowardName",
"type": "esriFieldTypeString",
"alias": "Signpost Toward Name"
},
{
"name": "Level",
"type": "esriFieldTypeInteger",
"alias": "Level"
},
{
"name": "ShortVoiceInstruction",
"type": "esriFieldTypeString",
"alias": "Short Voice Instruction",
"length": 1024
},
{
"name": "VoiceInstruction",
"type": "esriFieldTypeString",
"alias": "Voice Instruction",
"length": 1024
},
{
"name": "Azimuth",
"type": "esriFieldTypeDouble",
"alias": "Azimuth"
}
],
"features": [{
"attributes": {
"ObjectID": 1,
"RouteID": 1,
"Sequence": 1,
"DirectionPointType": 51,
"StopID": 1,
"DisplayText": "Start at Stop1",
"ArrivalTime": null,
"ArrivalUTCOffset": null,
"Name": "Stop1",
"ExitName": null,
"AlternateName": null,
"IntersectingName": null,
"BranchName": null,
"TowardName": null,
"Level": null,
"ShortVoiceInstruction": null,
"VoiceInstruction": null,
"Azimuth": 0
},
"geometry": {
"x": -116.99007760199999,
"y": 33.967480587000068
}
},
{
"attributes": {
"ObjectID": 2,
"RouteID": 1,
"Sequence": 2,
"DirectionPointType": 52,
"StopID": null,
"DisplayText": "Go north on Nancy Ave toward Cherry Valley Blvd",
"ArrivalTime": null,
"ArrivalUTCOffset": null,
"Name": "Nancy Ave",
"ExitName": null,
"AlternateName": null,
"IntersectingName": "",
"BranchName": null,
"TowardName": null,
"Level": null,
"ShortVoiceInstruction": null,
"VoiceInstruction": null,
"Azimuth": 1.7238311767578125
},
"geometry": {
"x": -116.99007760199999,
"y": 33.967480587000068
}
},
{
"attributes": {
"ObjectID": 3,
"RouteID": 1,
"Sequence": 3,
"DirectionPointType": 305,
"StopID": null,
"DisplayText": "Turn right on Cherry Valley Blvd",
"ArrivalTime": null,
"ArrivalUTCOffset": null,
"Name": "Cherry Valley Blvd",
"ExitName": null,
"AlternateName": null,
"IntersectingName": null,
"BranchName": null,
"TowardName": null,
"Level": null,
"ShortVoiceInstruction": null,
"VoiceInstruction": null,
"Azimuth": 90
},
"geometry": {
"x": -116.99003999999996,
"y": 33.96873000000005
}
},
{
"attributes": {
"ObjectID": 4,
"RouteID": 1,
"Sequence": 4,
"DirectionPointType": 50,
"StopID": 2,
"DisplayText": "Finish at Stop2, on the left",
"ArrivalTime": null,
"ArrivalUTCOffset": null,
"Name": "Stop2",
"ExitName": null,
"AlternateName": null,
"IntersectingName": null,
"BranchName": null,
"TowardName": null,
"Level": null,
"ShortVoiceInstruction": null,
"VoiceInstruction": null,
"Azimuth": 0
},
"geometry": {
"x": -116.98829886599998,
"y": 33.96873000000005
}
}
],
"exceededTransferLimit": false
}
}
output_direction_lines
Specifies the output route lines calculated in the analysis sliced to represent each route segment between Direction
events or maneuver locations.
Field name | Description |
---|---|
| The ObjectID of the feature in the |
| The ObjectID of the output |
| The type of direction situation described by this line, designated by one of the following values:
|
| The length of the line segment measured in meters. |
| The travel time along the line segment in minutes. |
| The building level at which this direction event begins. This value corresponds to the |
| The building level at which this direction event ends. This value corresponds to the |
Syntax example for output_direction_lines
The output
parameter is returned as a JSON feature set with the following syntax:
{
"paramName": "output_direction_lines",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPolyline",
"spatialReference": {
"wkid": <wkid>,
"latestWkid": <wkid>
},
"fields": [
{
"name": "<field1Name>",
"type": "<field1Type>",
"alias": "<field1Alias>",
"length": "<field1Length>" //length is included only for esriFieldTypeString
},
{
"name": "<field2Name>",
"type": "<field2Type>",
"alias": "<field2Alias>",
"length": "<field2Length>"
}
],
"features": [
{
"attributes": {
"<field1>": <value11>,
"<field2>": <value12>
},
"geometry": {
"paths": [
[
[
<x11>,
<y11>
],
[
<x12>,
<y12>
]
],
[
[
<x21>,
<y21>
],
[
<x22>,
<y22>
]
]
]
}
},
{
"attributes": {
"<field1>": <value21>,
"<field2>": <value22>
},
"geometry": {
"paths": [
[
[
<x11>,
<y11>
],
[
<x12>,
<y12>
]
],
[
[
<x21>,
<y21>
],
[
<x22>,
<y22>
]
]
]
}
}
],
"exceededTransferLimit": <true|false>
}
}
Example for output_direction_lines
The following shows an example of the output
parameter:
{
"paramName": "output_direction_lines",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPolyline",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"fields": [{
"name": "ObjectID",
"type": "esriFieldTypeOID",
"alias": "ObjectID"
},
{
"name": "DirectionPointID",
"type": "esriFieldTypeInteger",
"alias": "Direction Point ID"
},
{
"name": "RouteID",
"type": "esriFieldTypeInteger",
"alias": "Route ID"
},
{
"name": "DirectionLineType",
"type": "esriFieldTypeInteger",
"alias": "Direction Line Type"
},
{
"name": "Meters",
"type": "esriFieldTypeDouble",
"alias": "Meters"
},
{
"name": "Minutes",
"type": "esriFieldTypeDouble",
"alias": "Minutes"
},
{
"name": "FromLevel",
"type": "esriFieldTypeInteger",
"alias": "From Level"
},
{
"name": "ToLevel",
"type": "esriFieldTypeInteger",
"alias": "To Level"
},
{
"name": "Shape_Length",
"type": "esriFieldTypeDouble",
"alias": "Shape_Length"
}
],
"features": [{
"attributes": {
"ObjectID": 1,
"DirectionPointID": 2,
"RouteID": 1,
"DirectionLineType": 1,
"Meters": 138.63309138928537,
"Minutes": 0.20794963587952883,
"FromLevel": null,
"ToLevel": null,
"Shape_Length": 0.0012499787017906437
},
"geometry": {
"paths": [
[
[
-116.99007760199999,
33.967480587000068
],
[
-116.99003999999996,
33.96873000000005
]
]
]
}
},
{
"attributes": {
"ObjectID": 2,
"DirectionPointID": 3,
"RouteID": 1,
"DirectionLineType": 1,
"Meters": 160.91529151117024,
"Minutes": 0.14887344090869106,
"FromLevel": null,
"ToLevel": null,
"Shape_Length": 0.0017411339999853226
},
"geometry": {
"paths": [
[
[
-116.99003999999996,
33.96873000000005
],
[
-116.98971999999998,
33.96873000000005
],
[
-116.98903999999999,
33.96873000000005
],
[
-116.98829886599998,
33.96873000000005
]
]
]
}
}
],
"exceededTransferLimit": false
}
}
output_stops
This 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.
Field | Description |
---|---|
| The name of the stop visited by the route. The values for this field are copied from the |
| 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. |
| The order in which the stops are visited by the assigned route, which is listed in the |
| The earliest time the route can visit the stop. The values for this field are copied from the |
| The latest time the route can visit the stop. The values for this field are copied from the |
| The side of the vehicle the curb is on when arriving at the stop. |
| The side of the vehicle the curb is on when departing from the stop. |
| 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. |
| 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. |
| 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. |
| The date and time value indicating the departure time in coordinated universal time (UTC) |
| The stop type. The values for this field are copied from the |
| The numeric identifier of the network dataset source feature class on which the input point is located. |
| The ObjectID of the feature in the source on which the input point is located. |
| The position along the digitized direction of the source line feature. This value is stored as a ratio. This field is null if the network location references a junction. |
| The side of the edge in relation to the digitized direction of the line feature. This field is limited to a domain of two values: Right Side (1) and Left Side (2). |
| The direction a vehicle may arrive at and depart from the stop. The values for this field are copied from the |
| Indicates the status of the point with respect to its location on the network and the outcome of the analysis. The possible values are the following:
|
| The x-coordinate of the position on the network dataset where the point was located, in the coordinate system of the network dataset. |
| The y-coordinate of the position on the network dataset where the point was located, in the coordinate system of the network dataset. |
| The z-coordinate of the position on the network dataset where the point was located, in the coordinate system of the network dataset. The |
| The distance in meters between the point's geographic location and the position where it was located on the network. |
| The amount of time added to the total route time when this stop is visited. The values for this field are copied from the |
| The amount of distance added to the total route distance when this stop is visited. The values for this field are copied from the |
| The cost added to the total route cost when this stop is visited. The values for this field are copied from the The cost added to the total route cost when this stop is visited. The values for this field are copied from the |
| The cumulative duration of the route in minutes from the origin to and including the stop. The value reported here is the cumulative route time to the stop, including any additional time at the stop and at any previous stops. For example, if a route analysis determines that it takes 10 minutes to visit two stops, and the second stop has an |
| The cumulative distance of the route in miles from the origin to and including the stop. The value reported here is the cumulative route distance to the stop, including any additional distance at the stop and at any previous stops. |
| The cumulative distance of the route in kilometers from the origin to and including the stop. The value reported here is the cumulative route distance to the stop, including any additional distance at the stop and at any previous stops. |
| The cumulative cost of the route from the origin to and including the stop. The value reported here is the cumulative route cost to the stop, including any additional cost at the stop and at any previous stops. This field is included only when the travel mode used for the analysis has an impedance attribute that is neither time based nor distance based. The value is in unknown units. |
| This field stores the time spent waiting for the time window to open when the route arrives early at the stop. The field has a null value if time windows are not used in the analysis. |
| This field stores the sum of how much time has been spent waiting for time windows to open. It measures idle time. It includes the wait time from the current stop and all previous stops visited by the route. The field has a null value if time windows are not used in the analysis. Additional fields |
| This field is a measure of how late the route arrived after the time window closed. Specifically, it stores the amount of time between the end of the time window and when the route arrived at the stop. The field has a null value if time windows are not used in the analysis. Additional fields |
| This field stores the cumulative violation time from the current stop and all previous stops visited by the route. The field has a null value if time windows are not used in the analysis. Additional fields |
| The |
| The values for this field are copied from the |
| The values for this field are copied from the |
| The values for this field are copied from the |
The output
parameter is returned as a JSON feature set with following syntax:
{
"paramName": "Output_Stops",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPoint",
"spatialReference": {
"wkid": <wkid>,
"latestWkid": <wkid>
},
"fields": [
{
"name": "<field1Name>",
"type": "<field1Type>",
"alias": "<field1Alias>""length": "<field1Length>"
},
{
"name": "<field2Name>",
"type": "<field2Type>",
"alias": "<field2Alias>""length": "<field2Length>"
}
],
"features": [
{
"attributes": {
"<field1>": <value11>,
"<field2>;": <value12>;
}"geometry": {
"x": <x11>,
"y": <y11>
}
},
{
"attributes": {
"<field1>": <value21>,
"<field2>;": <value22>;
}"geometry": {
"x": <x21>,
"y": <y21>
}
],
"exceededTransferLimit": <true|false>
}
}
}
The following shows an example of the output
parameter.
{
"paramName": "Output_Stops",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPoint",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"fields": [
{
"name": "OID",
"type": "esriFieldTypeOID",
"alias": "OID"
},
{
"name": "Name",
"type": "esriFieldTypeString",
"alias": "Name",
"length": 128
},
{
"name": "RouteName",
"type": "esriFieldTypeString",
"alias": "RouteName",
"length": 128
},
{
"name": "Sequence",
"type": "esriFieldTypeInteger",
"alias": "Sequence",
"domain": {
"type": "range",
"name": "Sequence",
"range": [
1,
2147483647
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDefaultValue"
}
},
{
"name": "TimeWindowStart",
"type": "esriFieldTypeDate",
"alias": "TimeWindowStart",
"length": 16
},
{
"name": "TimeWindowEnd",
"type": "esriFieldTypeDate",
"alias": "TimeWindowEnd",
"length": 16
},
{
"name": "ArriveCurbApproach",
"type": "esriFieldTypeInteger",
"alias": "ArriveCurbApproach",
"domain": {
"type": "codedValue",
"name": "NACurbApproach",
"codedValues": [
{
"name": "Either side of vehicle",
"code": 0
},
{
"name": "Right side of vehicle",
"code": 1
},
{
"name": "Left side of vehicle",
"code": 2
},
{
"name": "No U-turn",
"code": 3
}
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDefaultValue"
}
},
{
"name": "DepartCurbApproach",
"type": "esriFieldTypeInteger",
"alias": "DepartCurbApproach",
"domain": {
"type": "codedValue",
"name": "NACurbApproach",
"codedValues": [
{
"name": "Either side of vehicle",
"code": 0
},
{
"name": "Right side of vehicle",
"code": 1
},
{
"name": "Left side of vehicle",
"code": 2
},
{
"name": "No U-turn",
"code": 3
}
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDefaultValue"
}
},
{
"name": "LocationType",
"type": "esriFieldTypeInteger",
"alias": "LocationType",
"domain": {
"type": "codedValue",
"name": "NALocationType",
"codedValues": [
{
"name": "Stop",
"code": 0
},
{
"name": "Waypoint",
"code": 1
},
{
"name": "Break",
"code": 2
}
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDefaultValue"
}
},
{
"name": "CurbApproach",
"type": "esriFieldTypeInteger",
"alias": "CurbApproach",
"domain": {
"type": "codedValue",
"name": "NACurbApproach",
"codedValues": [
{
"name": "Either side of vehicle",
"code": 0
},
{
"name": "Right side of vehicle",
"code": 1
},
{
"name": "Left side of vehicle",
"code": 2
},
{
"name": "No U-turn",
"code": 3
}
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDefaultValue"
}
},
{
"name": "Status",
"type": "esriFieldTypeInteger",
"alias": "Status",
"domain": {
"type": "codedValue",
"name": "NALocationStatus",
"codedValues": [
{
"name": "OK",
"code": 0
},
{
"name": "Not located",
"code": 1
},
{
"name": "Network element not located",
"code": 2
},
{
"name": "Element not traversable",
"code": 3
},
{
"name": "Invalid field values",
"code": 4
},
{
"name": "Not reached",
"code": 5
},
{
"name": "Time window violation",
"code": 6
}
],
"mergePolicy": "esriMPTDefaultValue",
"splitPolicy": "esriSPTDefaultValue"
}
},
{
"name": "AdditionalTime",
"type": "esriFieldTypeDouble",
"alias": "AdditionalTime"
},
{
"name": "Cumul_Minutes",
"type": "esriFieldTypeDouble",
"alias": "Cumul_Minutes"
},
{
"name": "Cumul_Kilometers",
"type": "esriFieldTypeDouble",
"alias": "Cumul_Kilometers"
},
{
"name": "ORIG_FID",
"type": "esriFieldTypeInteger",
"alias": "ORIG_FID"
},
{
"name": "Cumul_Miles",
"type": "esriFieldTypeDouble",
"alias": "Cumul_Miles"
}
],
"features": [
{
"attributes": {
"OID": 1,
"Name": "Stop1",
"RouteName": null,
"Sequence": 1,
"TimeWindowStart": null,
"TimeWindowEnd": null,
"ArriveCurbApproach": null,
"DepartCurbApproach": 1,
"LocationType": 0,
"CurbApproach": 0,
"Status": 0,
"AdditionalTime": 0,
"Cumul_Minutes": 0,
"Cumul_Kilometers": 0,
"ORIG_FID": 1,
"Cumul_Miles": 0
},
"geometry": {
"x": 145.06573064800011,
"y": -37.865134933999968
}
},
{
"attributes": {
"OID": 2,
"Name": "Stop2",
"RouteName": null,
"Sequence": 2,
"TimeWindowStart": null,
"TimeWindowEnd": null,
"ArriveCurbApproach": 2,
"DepartCurbApproach": null,
"LocationType": 0,
"CurbApproach": 0,
"Status": 0,
"AdditionalTime": 0,
"Cumul_Minutes": 14.296418563584401,
"Cumul_Kilometers": 8.6253749504299684,
"ORIG_FID": 2,
"Cumul_Miles": 5.3595600000000001
},
"geometry": {
"x": 145.10495676700009,
"y": -37.81866925199995
}
}
],
"exceededTransferLimit": false
}
}
output_route_edges
This provides access to the individual network edges along which the routes travel.
This parameter has value only when the populate
parameter is set to True
.
The following table lists the fields supported by the output route edges:
Field | Description |
---|---|
| The name of the edge source feature class from which the line was generated. |
| The |
| The ID representing the edge that comprises the street feature. Since there can be more than one edge per street feature, the |
| Specifies where the output
|
| Specifies where the output
|
| Uniquely identifies the route that traversed the edge. The |
| The travel time in minutes of the traversed portion of the underlying street feature. |
| The length in miles of the traversed portion of the underlying street feature. |
| The length in kilometers of the traversed portion of the underlying street feature. |
| The travel cost of the traversed portion of the underlying street feature. This field is included only when the travel mode used for the analysis has an impedance attribute that is neither time based nor distance based. The value is in unknown units. |
| The travel time in minutes of the route from its origin to the end of the traversed portion of this underlying street feature. |
| The length in miles of the route from its origin to the end of the traversed portion of this underlying street feature. |
| The length in kilometers of the route from its origin to the end of the traversed portion of this underlying street feature. |
| The travel cost of the route from its origin to the end of the traversed portion of this underlying street feature. This field is included only when the travel mode used for the analysis has an impedance attribute that is neither time based nor distance based. The value is in unknown units. |
| Specifies whether the traversed edge used the soft restriction attribute referred to in this field's name.
For example, if the analysis was performed using the soft restriction called Avoid Toll Roads, a field called |
The output
parameter is returned as a JSON feature set with following syntax:
{
"paramName": "Output_Routes_Edges",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPolyline",
"spatialReference": {
"wkid": <wkid>,
"latestWkid": <wkid>,
},
"fields": [
{
"name": "<field1Name>",
"type": "<field1Type>",
"alias": "<field1Alias>",
"length": "<field1Length>" //length is included only for esriFieldTypeString
},
{
"name": "<field2Name>",
"type": "<field2Type>",
"alias": "<field2Alias>",
"length": "<field2Length>"
}
],
"features": [
{
"geometry": {
"paths": [
[
[
<x11>,
<y11>
],
[
<x12>,
<y12>
]
],
[
[
<x21>,
<y21>
],
[
<x22>,
<y22>
]
]
]
},
"attributes": {
"<field1>": <value11>,
"<field2>": <value12>
}
},
{
"geometry": {
"paths": [
[
[
<x11>,
<y11>
],
[
<x12>,
<y12>
]
],
[
[
<x21>,
<y21>
],
[
<x22>,
<y22>
]
]
]
},
"attributes": {
"<field1>": <value21>,
"<field2>": <value22>
}
}
],
"exceededTransferLimit": <true|false>
}
}
The following shows an example of the output
parameter.
{
"paramName": "Output_Route_Edges",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPolyline",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"fields": [
{
"name": "ObjectID",
"type": "esriFieldTypeOID",
"alias": "ObjectID"
},
{
"name": "SourceName",
"type": "esriFieldTypeString",
"alias": "SourceName",
"length": 255
},
{
"name": "SourceOID",
"type": "esriFieldTypeInteger",
"alias": "SourceOID"
},
{
"name": "RouteEdgeID",
"type": "esriFieldTypeInteger",
"alias": "RouteEdgeID"
},
{
"name": "FromPosition",
"type": "esriFieldTypeDouble",
"alias": "FromPosition"
},
{
"name": "ToPosition",
"type": "esriFieldTypeDouble",
"alias": "ToPosition"
},
{
"name": "RouteID",
"type": "esriFieldTypeInteger",
"alias": "RouteID"
},
{
"name": "Attr_Minutes",
"type": "esriFieldTypeDouble",
"alias": "Attr_Minutes"
},
{
"name": "Cumul_Minutes",
"type": "esriFieldTypeDouble",
"alias": "Cumul_Minutes"
},
{
"name": "Attr_Kilometers",
"type": "esriFieldTypeDouble",
"alias": "Attr_Kilometers"
},
{
"name": "Cumul_Kilometers",
"type": "esriFieldTypeDouble",
"alias": "Cumul_Kilometers"
},
{
"name": "Attr_Avoid_Unpaved_Roads",
"type": "esriFieldTypeInteger",
"alias": "Attr_Avoid Unpaved Roads"
},
{
"name": "Attr_Avoid_Private_Roads",
"type": "esriFieldTypeInteger",
"alias": "Attr_Avoid Private Roads"
},
{
"name": "Attr_Avoid_Gates",
"type": "esriFieldTypeInteger",
"alias": "Attr_Avoid Gates"
},
{
"name": "Attr_Through_Traffic_Prohibited",
"type": "esriFieldTypeInteger",
"alias": "Attr_Through Traffic Prohibited"
},
{
"name": "Attr_Miles",
"type": "esriFieldTypeDouble",
"alias": "Attr_Miles"
},
{
"name": "Cumul_Miles",
"type": "esriFieldTypeDouble",
"alias": "Cumul_Miles"
},
{
"name": "Shape_Length",
"type": "esriFieldTypeDouble",
"alias": "Shape_Length"
}
],
"features": [
{
"attributes": {
"ObjectID": 1,
"SourceName": "Routing_Streets",
"SourceOID": 28553595,
"RouteEdgeID": 33578310,
"FromPosition": 0.53935587127584417,
"ToPosition": 0,
"RouteID": 1,
"Attr_Minutes": 0.30607205176400221,
"Cumul_Minutes": 0.30607205176400221,
"Attr_Kilometers": 0.12037825998265438,
"Cumul_Kilometers": 0.12037825998265438,
"Attr_Avoid_Unpaved_Roads": 0,
"Attr_Avoid_Private_Roads": 0,
"Attr_Avoid_Gates": 0,
"Attr_Through_Traffic_Prohibited": 0,
"Attr_Miles": 0.074800000000000005,
"Cumul_Miles": 0.074800000000000005,
"Shape_Length": 0.001307468992936962
},
"geometry": {
"paths": [
[
[
145.06591391900008,
-37.864739829999962
],
[
145.0671000000001,
-37.865289999999959
]
....
.... additional points in the route part
....
]
]
}
},
{
"attributes": {
"ObjectID": 2,
"SourceName": "Routing_Streets",
"SourceOID": 28553594,
"RouteEdgeID": 33578307,
"FromPosition": 0.78894821574891705,
"ToPosition": 0.65663679210329906,
"RouteID": 1,
"Attr_Minutes": 0.14121413009703704,
"Cumul_Minutes": 0.44728618186103924,
"Attr_Kilometers": 0.079332016796953356,
"Cumul_Kilometers": 0.19971027677960773,
"Attr_Avoid_Unpaved_Roads": 0,
"Attr_Avoid_Private_Roads": 0,
"Attr_Avoid_Gates": 0,
"Attr_Through_Traffic_Prohibited": 0,
"Attr_Miles": 0.04929,
"Cumul_Miles": 0.12409000000000001,
"Shape_Length": 0.00076609398903347678
},
"geometry": {
"paths": [
[
[
145.0671000000001,
-37.865289999999959
],
[
145.0666500000001,
-37.864669999999933
],
....
.... additional points in the route part
....
]
]
}
}
],
"exceededTransferLimit": false
}
}
usage_cost
This parameter returns the credits used by the analysis.
Syntax example for usage_cost
The usage
parameter is returned as a JSON with the following syntax:
{
"paramName": "Usage_Cost",
"dataType": "GPString",
"value": {
"numObjects": "<number>",
"credits": "<number>"
}
}
Example for usage_cost
The following shows an example of the usage
parameter in which the analysis generated 9 billable objects (represented by num
) and 4.5 credits were used by the analysis.
{
"paramName": "Usage_Cost",
"dataType": "GPString",
"value": {
"numObjects": 9,
"credits": 4.5
}
}
solve_succeeded
Use this parameter to determine if the service was able to find the routes successfully. The error messages for the failure can be obtained by making a request to get the status of the job.
The solve
parameter is returned as a JSON feature set with following syntax:
{
"paramName": "Solve_Succeeded",
"dataType": "GPBoolean",
"value": <true | false>
}
The following shows an example of the solve
parameter:
{
"paramName": "Solve_Succeeded",
"dataType": "GPBoolean",
"value": true
}
output_route_data
Use this parameter to access a .zip
file that contains a file geodatabase containing the inputs and outputs of the analysis in a format that can be used to share route layers with ArcGIS Online or Portal for ArcGIS. The parameter value is populated only when the Save Route Data parameter is set to True.
output_result_file
Use this parameter to access the results from the analysis as a .zip
file containing one or more files for each output. The format of the individual file is specified by the Output Format parameter. The parameter value is not populated when the Output Format parameter is set to Feature Set.
output_network_analysis_layer
Use this parameter to access the network analysis layer file that stores the analysis settings and the inputs and outputs used for the analysis. The parameter value is populated only when the Save Output Network Analysis Layer parameter is set to True.
Usage limits
The table below lists the limits that apply to the job request route service.
Limit description | Limit value |
---|---|
Maximum number of stops | 10,000 |
Maximum number of stops per route | 150 |
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 (If the straight-line distance between any two stops is greater than this limit, the analysis will fail when the walking option for | 27 miles (43.45 kilometers) |
Force hierarchy beyond a straight-line distance of (If the straight-line distance between any two stops is greater than the limit shown here, the analysis uses hierarchy, even if useHierarchy is set to | 50 miles (80.46 kilometers) |
Maximum time a client can use this route service | 1 hour (3,600 seconds) |
Maximum number of directions features that can be returned | 1,000,000 |
Maximum number of route edges that can be returned | 1,000,000 |
Examples
Routing between two points
This example demonstrates routing between two points in Melbourne, Australia.
Request URL to submit the job
The first request is to submit a job that returns the job ID.
|
JSON response
{
"jobId": "jd6f6b61f07654f5aa5ef1b2392384e67",
"jobStatus": "esriJobSubmitted"
}
Request URL to query job status
The job ID obtained from the response of the first request can be queried periodically to determine the status of the job.
|
JSON response
{
"jobId": "j40959ba120534c138797d79bc9b40df9",
"jobStatus": "esriJobSucceeded",
"results": {
"Solve_Succeeded": {
"paramUrl": "results/Solve_Succeeded"
},
"Output_Routes": {
"paramUrl": "results/Output_Routes"
},
"Output_Route_Edges": {
"paramUrl": "results/Output_Route_Edges"
},
"Output_Directions": {
"paramUrl": "results/Output_Directions"
},
"Output_Stops": {
"paramUrl": "results/Output_Stops"
}
},
"inputs": {
"Stops": {
"paramUrl": "inputs/Stops"
},
"Measurement_Units": {
"paramUrl": "inputs/Measurement_Units"
},
"Analysis_Region": {
"paramUrl": "inputs/Analysis_Region"
},
"Reorder_Stops_to_Find_Optimal_Routes": {
"paramUrl": "inputs/Reorder_Stops_to_Find_Optimal_Routes"
},
"Preserve_Terminal_Stops": {
"paramUrl": "inputs/Preserve_Terminal_Stops"
},
"Return_to_Start": {
"paramUrl": "inputs/Return_to_Start"
},
"Use_Time_Windows": {
"paramUrl": "inputs/Use_Time_Windows"
},
"Time_of_Day": {
"paramUrl": "inputs/Time_of_Day"
},
"Time_Zone_for_Time_of_Day": {
"paramUrl": "inputs/Time_Zone_for_Time_of_Day"
},
"UTurn_at_Junctions": {
"paramUrl": "inputs/UTurn_at_Junctions"
},
"Point_Barriers": {
"paramUrl": "inputs/Point_Barriers"
},
"Line_Barriers": {
"paramUrl": "inputs/Line_Barriers"
},
"Polygon_Barriers": {
"paramUrl": "inputs/Polygon_Barriers"
},
"Use_Hierarchy": {
"paramUrl": "inputs/Use_Hierarchy"
},
"Restrictions": {
"paramUrl": "inputs/Restrictions"
},
"Attribute_Parameter_Values": {
"paramUrl": "inputs/Attribute_Parameter_Values"
},
"Route_Shape": {
"paramUrl": "inputs/Route_Shape"
},
"Route_Line_Simplification_Tolerance": {
"paramUrl": "inputs/Route_Line_Simplification_Tolerance"
},
"Populate_Route_Edges": {
"paramUrl": "inputs/Populate_Route_Edges"
},
"Populate_Directions": {
"paramUrl": "inputs/Populate_Directions"
},
"Directions_Language": {
"paramUrl": "inputs/Directions_Language"
},
"Directions_Distance_Units": {
"paramUrl": "inputs/Directions_Distance_Units"
},
"Directions_Style_Name": {
"paramUrl": "inputs/Directions_Style_Name"
}
},
"messages": []
}
Request URL to return output stops
Because the job succeeded, a request can be made to return the stops visited by the route. The output parameter used to retrieve these results is output
.
|
JSON response
The stops are essentially duplicates of the input facilities, but they exclude any stops that weren't reached.
{
"paramName": "Output_Closest_Facilities",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPoint",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"fields": [
{
"name": "OID",
"type": "esriFieldTypeOID",
"alias": "OID"
},
{
"name": "Name",
"type": "esriFieldTypeString",
"alias": "Name",
"length": 50
},
{
"name": "ID",
"type": "esriFieldTypeString",
"alias": "ID",
"length": 50
},
{
"name": "AdditionalTime",
"type": "esriFieldTypeDouble",
"alias": "Additional Time"
},
{
"name": "AdditionalDistance",
"type": "esriFieldTypeDouble",
"alias": "Additional Distance"
},
{
"name": "CurbApproach",
"type": "esriFieldTypeSmallInteger",
"alias": "Curb Approach"
},
{
"name": "ORIG_FID",
"type": "esriFieldTypeSmallInteger",
"alias": "ORIG_FID"
}
],
"features": [
{
"attributes": {
"OID": 1,
"Name": "Station 20",
"ID": null,
"AdditionalTime": 0,
"AdditionalDistance": 0,
"CurbApproach": 0,
"ORIG_FID": 1
},
"geometry": {
"x": -122.45596200044594,
"y": 37.75131599973366
}
},
{
"attributes": {
"OID": 2,
"Name": "Station 39",
"ID": null,
"AdditionalTime": 0,
"AdditionalDistance": 0,
"CurbApproach": 0,
"ORIG_FID": 3
},
"geometry": {
"x": -122.45784400000059,
"y": 37.74071300000497
}
}
],
"exceededTransferLimit": false
}
}
Request URL to return the output routes
Because the job succeeded, a request can be made to return the routes from the output
output parameter.
|
JSON response
{
"paramName": "Output_Routes",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPolyline",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"fields": [
{
"name": "OID",
"type": "esriFieldTypeOID",
"alias": "OID"
},
{
"name": "Name",
"type": "esriFieldTypeString",
"alias": "Name",
"length": 128
},
{
"name": "StopCount",
"type": "esriFieldTypeInteger",
"alias": "StopCount"
},
{
"name": "Total_Minutes",
"type": "esriFieldTypeDouble",
"alias": "Total_Minutes"
},
{
"name": "Total_Miles",
"type": "esriFieldTypeDouble",
"alias": "Total_Miles"
},
{
"name": "FirstStopOID",
"type": "esriFieldTypeInteger",
"alias": "FirstStopOID"
},
{
"name": "LastStopOID",
"type": "esriFieldTypeInteger",
"alias": "LastStopOID"
},
{
"name": "Total_Kilometers",
"type": "esriFieldTypeDouble",
"alias": "Total_Kilometers"
},
{
"name": "Shape_Length",
"type": "esriFieldTypeDouble",
"alias": "Shape_Length"
}
],
"features": [
{
"attributes": {
"OID": 1,
"Name": "Stop1 - Stop2",
"StopCount": 2,
"Total_Minutes": 12.560998302743993,
"Total_Miles": 5.332129199370574,
"FirstStopOID": 1,
"LastStopOID": 2,
"Total_Kilometers": 8.58123,
"Shape_Length": 0.08516636408377337
},
"geometry": {
"paths": [
[
[
145.06591391900008,
-37.86473982999996
],
[
145.0671000000001,
-37.86528999999996
],
...
... additional points
...
[
145.10584000000006,
-37.818539999999985
],
[
145.10498172400003,
-37.81844463599998
]
]
]
}
}
],
"exceededTransferLimit": false
}
}
Request URL to return the output route edges
A request can also be made to return the roads the route traversed by using the output
output parameter.
|
JSON response
{
"paramName": "Output_Route_Edges",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPolyline",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"fields": [
{
"name": "ObjectID",
"type": "esriFieldTypeOID",
"alias": "ObjectID"
},
{
"name": "SourceName",
"type": "esriFieldTypeString",
"alias": "SourceName",
"length": 255
},
{
"name": "SourceOID",
"type": "esriFieldTypeInteger",
"alias": "SourceOID"
},
{
"name": "RouteEdgeID",
"type": "esriFieldTypeInteger",
"alias": "RouteEdgeID"
},
{
"name": "FromPosition",
"type": "esriFieldTypeDouble",
"alias": "FromPosition"
},
{
"name": "ToPosition",
"type": "esriFieldTypeDouble",
"alias": "ToPosition"
},
{
"name": "RouteID",
"type": "esriFieldTypeInteger",
"alias": "RouteID"
},
{
"name": "Attr_Minutes",
"type": "esriFieldTypeDouble",
"alias": "Attr_Minutes"
},
{
"name": "Cumul_Minutes",
"type": "esriFieldTypeDouble",
"alias": "Cumul_Minutes"
},
{
"name": "Attr_Miles",
"type": "esriFieldTypeDouble",
"alias": "Attr_Miles"
},
{
"name": "Cumul_Miles",
"type": "esriFieldTypeDouble",
"alias": "Cumul_Miles"
},
{
"name": "Attr_Kilometers",
"type": "esriFieldTypeDouble",
"alias": "Attr_Kilometers"
},
{
"name": "Cumul_Kilometers",
"type": "esriFieldTypeDouble",
"alias": "Cumul_Kilometers"
},
{
"name": "Attr_Avoid_Unpaved_Roads",
"type": "esriFieldTypeInteger",
"alias": "Attr_Avoid Unpaved Roads"
},
{
"name": "Attr_Avoid_Private_Roads",
"type": "esriFieldTypeInteger",
"alias": "Attr_Avoid Private Roads"
},
{
"name": "Attr_Avoid_Gates",
"type": "esriFieldTypeInteger",
"alias": "Attr_Avoid Gates"
},
{
"name": "Attr_Through_Traffic_Prohibited",
"type": "esriFieldTypeInteger",
"alias": "Attr_Through Traffic Prohibited"
},
{
"name": "Shape_Length",
"type": "esriFieldTypeDouble",
"alias": "Shape_Length"
}
],
"features": [
{
"attributes": {
"ObjectID": 1,
"SourceName": "Routing_Streets",
"SourceOID": 348757,
"RouteEdgeID": 1044044,
"FromPosition": 0.24152278890808054,
"ToPosition": 0,
"RouteID": 1,
"Attr_Minutes": 0.26806711433068997,
"Cumul_Minutes": 0.26806711433068997,
"Attr_Miles": 0.08134,
"Cumul_Miles": 0.08134,
"Attr_Kilometers": 0.1309,
"Cumul_Kilometers": 0.13091,
"Attr_Avoid_Unpaved_Roads": 0,
"Attr_Avoid_Private_Roads": 0,
"Attr_Avoid_Gates": 0,
"Attr_Through_Traffic_Prohibited": 0,
"Shape_Length": 0.001307468992936962
},
"geometry": {
"paths": [
[
[
145.06591391900008,
-37.86473982999996
],
[
145.0671000000001,
-37.86528999999996
]
]
]
}
},
{
"attributes": {
"ObjectID": 2,
"SourceName": "Routing_Streets",
"SourceOID": 348752,
"RouteEdgeID": 1044034,
"FromPosition": 0.7871324499552366,
"ToPosition": 0.6536826964062661,
"RouteID": 1,
"Attr_Minutes": 0.12864303488287535,
"Cumul_Minutes": 0.3967101492135653,
"Attr_Miles": 0.04901,
"Cumul_Miles": 0.13035,
"Attr_Kilometers": 0.07887,
"Cumul_Kilometers": 0.20977,
"Attr_Avoid_Unpaved_Roads": 0,
"Attr_Avoid_Private_Roads": 0,
"Attr_Avoid_Gates": 0,
"Attr_Through_Traffic_Prohibited": 0,
"Shape_Length": 0.0007660939890334768
},
"geometry": {
"paths": [
[
[
145.0671000000001,
-37.86528999999996
],
[
145.0666500000001,
-37.86466999999993
]
]
]
}
},
...
... additional lines
...
{
"attributes": {
"ObjectID": 94,
"SourceName": "Routing_Streets",
"SourceOID": 353664,
"RouteEdgeID": 1053829,
"FromPosition": 1,
"ToPosition": 0.5795813481826116,
"RouteID": 1,
"Attr_Minutes": 0.034457844833688085,
"Cumul_Minutes": 12.338099872364964,
"Attr_Miles": 0.00627,
"Cumul_Miles": 5.28493,
"Attr_Kilometers": 0.01009,
"Cumul_Kilometers": 8.50527,
"Attr_Avoid_Unpaved_Roads": 0,
"Attr_Avoid_Private_Roads": 0,
"Attr_Avoid_Gates": 0,
"Attr_Through_Traffic_Prohibited": 0,
"Shape_Length": 0.00009999999999763532
},
"geometry": {
"paths": [
[
[
145.10592000000008,
-37.81859999999995
],
[
145.10584000000006,
-37.818539999999985
]
]
]
}
},
{
"attributes": {
"ObjectID": 95,
"SourceName": "Routing_Streets",
"SourceOID": 353638,
"RouteEdgeID": 1053824,
"FromPosition": 1,
"ToPosition": 0.8187049287099665,
"RouteID": 1,
"Attr_Minutes": 0.22289843037902846,
"Cumul_Minutes": 12.560998302743993,
"Attr_Miles": 0.0472,
"Cumul_Miles": 5.33213,
"Attr_Kilometers": 0.07596,
"Cumul_Kilometers": 8.58123,
"Attr_Avoid_Unpaved_Roads": 0,
"Attr_Avoid_Private_Roads": 0,
"Attr_Avoid_Gates": 0,
"Attr_Through_Traffic_Prohibited": 0,
"Shape_Length": 0.0008635577483443818
},
"geometry": {
"paths": [
[
[
145.10584000000006,
-37.818539999999985
],
[
145.10498172400003,
-37.81844463599998
]
]
]
}
}
],
"exceededTransferLimit": false
}
}