Programming with ArcGIS Network Analyst extension


Summary
This topic discusses the best approach to perform some specific network analysis tasks.

In this topic


Determining your goals

ArcGIS Network Analyst extension can be used in ArcMap through geoprocessing tools, via ArcGIS Server or via ArcObjects. Before you begin programming with ArcGIS Network Analyst extension, determine what your goals are and decide where in the suite of ArcGIS Network Analyst extension products you can best accomplish your goals. Review this topic to help determine how to approach these specific tasks.

Automating ArcGIS Network Analyst extension workflows

See the following references for more information about automating ArcGIS Network Analyst extension workflows:

Performing network analysis

See the following for information on finding the shortest path route or closest facility, calculating a service area or origin destination cost matrix, optimizing the routing of a fleet of vehicles, or finding the best location for a facility:

Writing a new solver into the ArcGIS Network Analyst extension framework

If a network solver is required that is not supported, see the following information:

Working with network datasets

See the following information about working with street networks in ArcGIS:

Working with geometric networks

See the following information about working with utility and natural resource networks in ArcGIS:

Determine the proximity from one location to another

See the following information about proximity:
 
Proximity task
Network distances
Straight line distances
Point-to-Point proximity
Finds the nearest location from a set of locations
Finds the distance out from a location
Finds the distances from every location in a set of locations, to every location in another set of locations

Working with street directions

After network analysis is performed, a list of directions can be generated. See the following information about working with directions:

Extending the network dataset through custom evaluators

An evaluator assigns value for network attributes. See the following information about working with network evaluators:

Loading data into a Network Analysis Layer

See the following information about loading data into network analysis scenarios:

Working with the results of a completed analysis

See the following information about working with network analysis layers after a solve has been completed:

Using ArcGIS Network Analyst extension in ArcGIS Server

See the following information about working with ArcGIS Network Analyst extension in Server:
 
REST
Routing, Closest Facility, and Service Area solvers are accessible through a set REST endpoints located at http://<server>:6080/arcgis/rest/services.
The general pattern when working with Network Analysis through REST is as follows:
  1. Set properties that are different from the default.
  2. Set network locations.
  3. Make an HTTP request to the /Solve endpoint.
  4. Use the returned JSON object to get the results of the analysis.
More details can be found in REST API help.
REST and Web APIs
If you are writing a light-weight Web application, you do not have to code against the NAServer REST endpoint from scratch. Instead, you can use the out-of-the-box client side libraries. For more information, see the following:
SOAP
Routing, Closest Facility, Service Area, Location-Allocation, Vehicle Routing Problem, and Origin-Destination Const Matrix solvers are accessible through a set of coarse grained stateless SOAP objects.
The NAServer object is a MapServer server object extension that is capable of performing network analysis through a single, stateless method call. It is used in conjunction with various NAServerSolverParams and NAServerSolverResults objects.
The general pattern when working with server objects is as follows:
  1. Get a reference to an NAServer object either through a MapServer that has an NAServer extension loaded or through an NAServer Web service.
  2. Call NAServer.GetSolverParameters2 to get the NAServerSolverParams object holding the default parameters.
  3. Set properties on the NAServerSolverParams object to configure how you want the analysis to be performed.
  4. Set network locations (for example, Stops) to use in the analysis.
  5. Call NAServer.Solve, passing in the NAServerSolverParams object.
  6. Use the returned NAServerSolverResults object to get at the results of the analysis.
Please refer to SOAP SDK docs for more information.


See Also:

What is ArcGIS Network Analyst extension?
About the ArcGIS Network Analyst Tutorial
Essential ArcGIS Network Analyst extension vocabulary
NetworkAnalyst
ArcGIS Network Analyst extension Object Model Diagram
NetworkAnalystUI
An overview of the ArcGIS Network Analyst extension toolbox
What is a network dataset?
What are geometric networks?