To publish a routing service, you need to author a GIS resource, such as a network analysis layer or a geoprocessing tool in ArcGIS Pro, and publish the resource as a service. A routing service can be published as a map service with the network analysis capability or as a geoprocessing service. The service type you use for routing depends on your objectives and available resources.
If your ArcGIS Server site is federated with an ArcGIS Enterprise portal, the recommended way to publish routing services is to configure routing services based on your network dataset. Alternatively, you can also use the Publish Routing Services utility included with your ArcGIS Server installation. Configure routing services and the Publish Routing Services utility publish the same set of services, and automate all the steps required to publish the various routing services based on your network dataset.
There can be certain scenarios in which routing services created from the Publish Routing Services utility may not be adequate. In such cases, you can publish routing services to your ArcGIS Server site using ArcGIS Pro. This may be necessary in cases such as those below:
- You need a routing service to perform additional analysis that is not provided by the routing services created using the Publish Routing Services utility. For example, you may want to use a service that finds the best route between multiple input stops and then uses an elevation dataset (such as a digital elevation model) to generate an elevation profile graph for the route. In such cases, you can publish a geoprocessing service that achieves your desired workflow.
- You need to use a different network dataset than the one used by services created with the Publish Routing Services utility. For example, your organization may perform a majority of its network analysis based on street centerline data using applications such as ArcGIS Pro or the analysis tools available in Map Viewer Classic. At the same time, you may also need to perform analysis on an indoor transportation network representing walkways and hallways inside your campus using applications with ArcGIS Indoors. In these cases, you can use the Publish Routing Services utility to publish all the routing services based on the network dataset created from your street centerline data. You can publish additional routing services (as map services with the network analysis capability) based on your indoor network dataset and use these routing services with applications available with ArcGIS Indoors.
Map services for routing
Publishing a routing service as a map service with the network analysis capability involves the steps below:
- Create a map using ArcGIS Pro.
- Add the network dataset to your map.
- Create one or more network analysis layers in your map.
- Share your map as a map image layer from ArcGIS Pro if your ArcGIS Server site is federated with a portal, or as a map service when publishing to a stand-alone ArcGIS Server site from ArcGIS Pro. Enable the network analysis capability while publishing your map image layer or map service.
Publish a map service in ArcGIS Pro with the network analysis capability provides further instructions on how to achieve this workflow using ArcGIS Pro.
When publishing a map service or a map image layer, you must enable the network analysis capability to see a routing service in your ArcGIS Server site. Otherwise, your ArcGIS Server site will only have a map service that cannot be used to perform network analysis.
Geoprocessing services for routing
Publishing a geoprocessing service that performs routing involves these steps:
- Create a toolbox using ArcGIS Pro.
- Author a geoprocessing tool that performs the analysis you need to run.
- Share the geoprocessing tool as a web tool when publishing to a federated ArcGIS Server site, or as a geoprocessing service when publishing to a stand-alone ArcGIS Server site.
Geoprocessing service example: Get travel directions provides further instructions on how to achieve this workflow using ArcGIS Pro.
Choosing between a map service or a geoprocessing service for routing
The following table provides information about map services (with the network analysis capability) and geoprocessing services that can be used to perform network analyses described above.
|Analysis type||Map service||Geoprocessing service|
Travel cost matrix
The type of service you choose to publish a routing service depends on how the applications interact with the routing services. The following table can help you choose a type of routing service.
|Objective||Type of routing service|
Do the applications using the routing service require a very fast response time from the service?
Use a map service with the network analysis capability.
Does the routing service need to support the running of large problems that can take more than a few minutes to solve?
Use a geoprocessing service.
Do you want the maximum number of out-of-the-box applications provided by Esri to work with your routing services?
Use a geoprocessing service.