In this topic
- Determining your goals
- Automating ArcGIS Network Analyst extension workflows
- Performing network analysis
- Writing a new solver into the ArcGIS Network Analyst extension framework
- Working with network datasets
- Working with geometric networks
- Determining the proximity from one location to another
- Working with street directions
- Extending the network dataset through custom evaluators
- Loading data into a network analysis layer
- Working with the results of a completed analysis
- Using ArcGIS Network Analyst extension in ArcGIS Server
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:
- Geoprocessing —Automate your workflow by utilizing the ArcGIS Network Analyst extension Geoprocessing tools.
- Server—For information to develop with each of the server application programming interfaces (APIs), see the Using ArcGIS Network Analyst extension in ArcGIS Server section in this topic. For information on core ArcGIS Network Analyst extension Server ArcObjects, see NAServer OMD.
- ArcObjects—For information about programming against the ArcGIS Network Analyst extension application programming interface (API) and specific components, see the 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 ArcGIS Network Analyst extension 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. For more information, see 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 ArcGIS Network Analyst extension library overview within ArcObjects to create a stand-alone application.
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:
- 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 concepts—ArcGIS Network Analyst extension works on street networks in the form of network datasets. To get started, and for more information, see the ArcGIS Desktop Help system topics, What is ArcGIS Network Analyst extension? and What is a network dataset?.
- ArcObjects—To program against network datasets, see the network dataset section in the Geodatabase library overview, which has links to other topics and code samples.
- Creating a network dataset—Use 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—For more information, 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 concepts—ArcGIS Network Analyst extension 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— ArcGIS Network Analyst extension 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
|
||
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:
- General concepts—See the ArcGIS Desktop Help system topic, 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:
- General concepts—To fully understand network evaluators, see the ArcGIS Desktop Help system topic, Types of evaluators used by a network.
- ArcObjects
Loading data into a Network Analysis Layer
See the following information about loading data into network analysis scenarios:
- General concepts—For conceptual information, see the ArcGIS Desktop Help system topic, What are network analysis objects?.
- ArcObjects—For information about the different types of loading done via Java and ArcGIS Network Analyst extension API, see How to load data into a network analysis problem.
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 previously Help topics 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 ArcGIS Network Analyst extension in ArcGIS Server
See the following information about working with ArcGIS Network Analyst extension in Server:
- Publishing a network analysis service—See the Server Help system for more information about network analysis services, including a tutorial on publishing the service.
- Performing network analysis in ArcGIS Server— There are two main ways to use remote network analysis: through REST and SOAP APIs.
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:
- Set properties that are different from the default.
- Set network locations.
- Make an HTTP request to the /Solve endpoint.
- 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:
- Flex
- JavaScript
- Silverlight
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:
- Get a reference to an NAServer object either through a MapServer that has an NAServer extension loaded or through an NAServer Web service.
- Call NAServer.GetSolverParameters2 to get the NAServerSolverParams object holding the default parameters.
- Set properties on the NAServerSolverParams object to configure how you want the analysis to be performed.
- Set network locations (for example, Stops) to use in the analysis.
- Call NAServer.Solve, passing in the NAServerSolverParams object.
- 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?