Network analysis services

Release 9.3 E-mail This Topic Printable Version Give Us Feedback

Perhaps you've used a Web application that gives you directions between one point and another or lists facilities such as doctors' offices in your neighborhood based on an address you enter. These applications use network analysis on the 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 Server, you can create similar services that perform transportation network analysis operations such as routing, closest facility location, or service area analysis. These services use the Network Analyst Extension to perform analysis on a network dataset. A Network license is required on the server.

Note: Network analysis services cannot be used for performing utility network analysis on a geometric network.

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 the developer tools included with ArcGIS Server. The following sections explain these publishing steps in more detail.

Creating the map document

Before you can publish a network analysis service, you need to use ArcMap 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 ArcMap 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 ArcMap, see the Network Analyst section of the ArcGIS Desktop Help.

The map document and all the data that it references should be stored in shared network directories so that all server object container (SOC) machines can access them. Additionally, the ArcGIS Server Object Container account must have Read and Write permissions to the directories where the data is stored.

Publishing the service

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

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

Using the service

You can consume network analysis services using the Web Application Developer Framework (ADF) ArcGIS Server Data Source Library, the ArcGIS Server API, or the service's own Web Service Description Language (WSDL). The Developer Help contains topics and samples that explain in detail how to program with network analysis services.

Network analysis services cannot be consumed by the ArcGIS JavaScript and REST APIs. The way to perform network analysis with these APIs is to use a geoprocessing service that references a model with Network Analyst tools. Continue reading in the next section of this topic to learn more about geoprocessing services and network analysis.

Network analysis services are always published as extensions of map services. When you work with a map service programmatically, you can access its extensions, one of which is the NAServer extension if you have enabled the Network Analysis capability of the service. NAServer provides access to network analysis functions in a stateless environment.

As an alternative to working with the map service, you can work through the network analysis Web service directly. To access the Web service, you will need to know its URL, which will follow this pattern:

http://<server name>/<instance name>/services/<folder name (if applicable)>/<service name>/MapServer/NAServer

For example, if you had a map service Tokyo in the folder Japan running on a machine server1 with the default instance name of arcgis, the URL of the network analysis service would look like this:

http://server1/arcgis/services/Japan/Tokyo/MapServer/NAServer

Network analysis with geoprocessing services

Currently, the only way to work with ArcGIS Server network analysis services is through programmatic means. 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 from a model that you've built in ModelBuilder. A user submits some input to the geoprocessing service, the model runs on the server, and the results are sent back to the user's machine. The model can include Network Analyst tools that you add from ArcToolbox.

The following examples demonstrate how to set up network analysis tools in a geoprocessing service:

ArcGIS Server Manager provides a Geoprocessing task that helps you use geoprocessing services in your Web applications without writing any code.

Learn more about the Geoprocessing task.