Programming with Network Analyst


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

In this topic


Determining your goals

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

Automating Network Analyst workflows

See the following references for more information on automating Network Analyst workflows:
  • Geoprocessing Automate your workflow by utilizing the Network Analyst Geoprocessing tools
  • Server—For information to develop with each of the server application programming interfaces (APIs), see the following section on Using Network Analyst in ArcGIS Server. For information on core Network Analyst Server ArcObjects, see the following NAServer OMD
  • ArcObjects—For information about programming against the Network Analyst API and specific components, see NetworkAnalyst library overview.

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:
  • ArcMap—To accomplish these tasks use the Network Analyst solvers Route, Closest Facility, Service Area, Origin-Destination Cost Matrix, Vehicle Routing Problem (VRP) Solver, or Location-Allocation Solver to analyze a street network with ArcMap.  See the document Types of network analyses to explore conceptual information about each solver.
  • Geoprocessing—To automated your work, use the Geoprocessing tools applicable to each of the solvers. 
  • ArcObjects—You can also program against the previously mentioned Network Analyst library overview within ArcObjects to create a stand-alone application.

Writing a new solver into the Network Analyst framework

If a network solver is required that is not supported see the following information:
  • ArcObjects—Use C++ to create a solver. The large number of calls to the network dataset via the Java interop can generate a significant performance hit. The Connectivity Solver sample, in the C++ software development kit (SDK), is a good resource to write your solver. 

Working with network datasets

See the following information about working with street networks in ArcGIS:
  • General conceptsNetwork Analyst works on street networks in the form of network datasets. To get started, see What is Network Analyst?.  For more information, see the help section about network datasets.
  • ArcObjects—To program against network datasets, see the network dataset section in the network dataset section of the Geodatabase library overview, which has links to other topics and code samples.
  • Creating a network datasetUse ArcMap to create a network dataset, which has a network dataset creation wizard to help step you through the process. To programmatically create a network dataset, see the previously mentioned Geodatabase library overview, which includes links to network dataset samples and topics about programmatically creating a network dataset.
  • Opening a network dataset—See How to open a network dataset.

Working with geometric networks

See the following information about working with utility and natural resource networks in ArcGIS:
  • General conceptsNetwork Analyst does not work with the directed flow networks necessary to model utility and natural resource networks. See the section on geometric networks in the previously mentioned Geodatabase library overview.

Determine the proximity from one location to another

See the following information about proximity:
  • Geoprocessing—Network Analyst can help you find the network distance between locations. For non-network spatial distances, straight line (Euclidian) distance between two points can be determined by using the Point Distance Geoprocessing tool. Straight line closest facility analysis can be done using the Near Geoprocessing tool. A buffer polygon, instead of network service areas, can be determined using the Buffer and Multiple Ring Buffer tools. A cost table, instead of the origin-destination cost matrix, can be calculated with the Generate Near Table tool.

    See the following table with links to specific geoprocessing tools:
 
Proximity task
Network distances
Straight line distances
Point-to-Point proximity
Find the nearest location from a set of locations
Find the distance out from a location
Find the distances from every location in a set of locations to every location in another set of locations

Working with street directions

After a network analysis is performed, a list of directions can be generated. See the following information about working with directions:
  • General concepts—See the conceptual information about setting directions
  • ArcObjects.
  • Server.

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:
  • General concepts— To understand the resulting output classes after a solve, see the above listed conceptual help sections for each solver.
  • ArcObjects - You can use the traversal result to access the network elements and the underlying source features that make up a network path.
  • Server - Use solver-specific NAServerSolverResults subclasses.

Using Network Analyst in ArcGIS Server

See the following information about working with Network Analyst in Server:


See Also:

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