Skip To Content

Network analysis services

Perhaps you've used a web application that gives you directions between two points, or lists facilities such as doctors' offices in your neighborhood based on an address you enter. These applications use network analysis on a server to find the appropriate routes and facilities based on the information you provide. You don't need to have any special network analysis software on your machine to get the results you need, because the server does the work for you and returns the results to your machine via a web service.

Using ArcGIS Enterprise, you can host similar services that perform transportation network analysis operations such as finding the closest facility, mapping the best route for a vehicle or a fleet of vehicles, locating facilities using location allocation, calculating an OD cost matrix, and generating service areas. These services use the Network Analyst extension to perform analysis on a network dataset.


Network analysis services cannot be used for performing utility network analysis on a geometric network. Instead, you'll need to use ArcGIS Desktop. For more information, see What are geometric networks?

The first step to creating a network analysis service is to use ArcMap to create a map document that contains a network analysis layer. Then, publish the map as a service, ensuring that the Network Analysis capability is enabled. You can consume the resulting service using a variety of tools included with ArcGIS. The following sections explain this process in more detail.

Creating the map document

Before you can publish a network analysis service, you need to use ArcGIS Desktop to create a map document that, at a minimum, contains the network analysis layer you will use in your service. You can either add an existing network analysis layer by using the Add Data dialog box or create a new network analysis layer based on a network layer (referencing a network dataset) already in the map by using the Network Analyst toolbar. If you want the service to return an image of the resulting analysis on the map, you should also add whatever other layers you want to see in the map and adjust their symbology accordingly.

You can also use ArcGIS Desktop to set parameters that will be applied in the analysis by default. These include network locations, such as facilities and barriers, and solver properties, like number of facilities to find and restrictions. For more information about working with network analysis layers in ArcGIS Desktop, see the Network Analyst help section.

Publishing the service

After you have created and saved your map document, you can create the network analysis service by following the steps in How to publish a service. When publishing the resource, keep in mind the following:

  • In ArcGIS Desktop, there are two publishing scenarios: either you copy the data to the server when publishing, or you do not. If you will not be copying data to the server when publishing, you'll need to explicitly give the ArcGIS Server account read permissions to the data referenced by the map document before you publish. If you'll be copying data to the server when publishing, you do not need to grant the ArcGIS Server account permissions to your data. This process is described in detail in the help topic Making your data accessible to ArcGIS Server.

  • When specifying capabilities in the Service Editor, make sure Network Analysis is enabled.

For a detailed example of publishing a network analysis service, see Tutorial: Publishing a network analysis service.

Network Analyst capabilities

The following section describes the different capabilities that can be set before publishing the service.


Once Network Analysis is enabled, in the Service Editor dialog box, you can specify the below general settings.

  • Output Directory: The location to which result layers are written.

  • Default Output Geometry Precision: This value sets the default precision of the output geometry after generalization. If it is set to zero or not specified, no generalization of output geometry is performed. If it is specified and positive, it represents the MaximumAllowableOffset parameter. Generalization is performed according to IPolycurve.Generalize.

  • Allow users to save result layers on the server: This box specifies whether users can save result layers on the server for future re-use.

  • Save result layer on server when an error occurs: This box specifies whether result layers should automatically be saved in the output directory if there is an error during analysis. If selected, this option may aid in troubleshooting an error.

  • Save result layer on server when debugging: When this box is selected, result layers will automatically be saved in the output directory for every request if the log level is set to DEBUG.

  • Ignore network location fields: This setting tells the service not to use the location fields on the input analysis locations (stops, barriers, facilities, incidents, etc) if they are passed in with the request. It is useful to ignore network location fields if street names change often, to avoid passing in requests with stale location fields.


Constraints are a set of properties that can be defined for each solver to set parameters for your service output. These properties can be set from the Constraints tab. Common to each solver are the following constraints:

  • Max Barriers: The maximum number of point barriers allowed to pass in per request.
  • Max Features intersecting line barriers: The maximum number of streets that can be restricted by line barriers per request.
  • Max Features intersecting polygon barriers: The maximum number of streets that can be restricted by polygon barriers per request.
  • Force Hierarchy Beyond (Extent of Inputs) and Units of Force Hierarchy Beyond (Extent of Inputs):When stops are a great distance apart, solving requests can require a lot of time and server resources if this option is not selected.

Each solver has additional constraints that can be set:


  • Max Stops: The maximum number of stops that the user is allowed to pass in per request.
  • Allow time windows: This option specifies if the service supports the user passing in time windows on the input stops.

Service Area

  • Max Facilities: The maximum number of facilities allowed to pass in per request.
  • Max Break: and Units of Max Break: The maximum break value that may be specified for a service area request. The impedance units can be based on:
    • Time
    • Length
    • Other
  • Force Hierarchy Beyond (Break) and Units of Force Hierarchy Beyond Break: The maximum break value that may be specified for a service area request. After this maximum, the server will automatically change the request to use the network hierarchy.

Closest Facility

  • Max Facilities: The maximum number of facilities allowed to pass in per request.
  • Max Facilities to find : The maximum number of facilities from an incident you want the service to be able to find per request.
  • Max Incidents: The maximum number of incidents allowed to pass in per request.

OD Cost Matrix

  • Max Destinations: The maximum number of destinations allowed to pass in per request.
  • Max Destinations to Find: The maximum number of destinations from an origin you want the service to be able to find per request.
  • Max Origins: The maximum number of origins allowed to pass in per request.

Vehicle Routing Problem

  • Max Orders: The maximum number of orders allowed to pass in per request.
  • Max Routes: The maximum number of routes allowed to pass in per request.

Location Allocation

  • Max Demand Points: The maximum number of demand points allowed to pass in per request.
  • Max Facilities: The maximum number of facilities allowed to pass in per request.

Using the service

You can use network analysis services to provide specialized or locally hosted routing in your desktop applications. For example, the Find Route dialog box in ArcGIS Desktop and the Route dialog box in Explorer for ArcGIS are originally configured to access Esri network analysis services. If you want to use your own service, either because you have added special rules or data or because you lack an Internet connection, you can reconfigure these commands to use your own network analysis service. This does not require writing any code.

In web applications and other desktop scenarios, network analysis services must be consumed programmatically. ArcGIS developers have many choices of platforms that can work with network analysis services, such as the ArcGIS web APIs and the SOAP and REST APIs. Network analysis on the server is also available through ArcObjects using the coarse-grained object NAServer.

Network analysis in ArcGIS API for JavaScript applications

The general pattern for working with a network analysis service is:

  1. Get a reference to the network analysis service.
  2. Set up the solver parameters. These include which type of analysis you want to perform and the network locations (for example, stops) to use during the analysis.
  3. Call the Solve method on the network analysis service, passing in the solver parameters.
  4. Work with the results returned from the service. This could include displaying the results on the map or reporting driving directions.

Network analysis using ArcObjects

The ArcObjects SDK for the Microsoft .NET Framework provides concepts and samples that can help you get started developing with network analysis services using ArcObjects and SOAP. Visit the following links for more information:

Network analysis with geoprocessing services

If you're not comfortable writing code, you can still add network analysis functionality to your web applications through geoprocessing services. A geoprocessing service works typically from a model that you've built in ModelBuilder or an individual tool that is designed to be published as a service, such as Solve Vehicle Routing Problem or Generate Service Areas. A user submits some input to the geoprocessing service, the model or tool runs on the server, and the results are sent back to the user's machine.

You can also perform any network analysis using live traffic speeds. To do this, you need to set up your own traffic service using the Update Traffic Data geoprocessing tool and point the network dataset that the analysis will be performed on to that service. Alternatively, you can point the network dataset to a traffic service that is available on ArcGIS Online. Make sure that the analysis you set up specifies a traffic-based cost attribute, such as TravelTime, and a start time is specified.

Available functionality

Some of the Esri client APIs vary in the level of complexity that they allow when working with network analysis services. The following table specifies which solvers are available with each API:

ArcGIS APINetwork analysis servicesGeoprocessing services

JavaScript, REST, Windows Phone, iOS

Route, Service Area, Closest Facility