Available with Network Analyst license.
Routes represent the quickest or shortest path along roads to visit stops or point locations. They can be basic point-to-point routes visited in the order you specify or in the order that minimizes overall travel time or distance. A route is associated with a local network dataset or a network service hosted in ArcGIS Online or ArcGIS Enterprise. This tutorial first shows how to use a local network dataset and then shows how to use the online service.
Get the data
The data for this tutorial is available for download.
- Go to the data download page.
- Click the Download button, and save the file locally.
- Unzip the downloaded file.
Create a map
- Open ArcGIS Pro.
- Create a new project based on the Map.aptx template.
A new project with a map appears.
Add the tutorial data to the project
A network dataset is an intelligent model of the road system. It contains not only the location and attributes of roads, but also information about how roads relate to one another, such as which roads are connected, which turns between connected roads are allowed or prohibited, and other information that affects what travel paths are possible and how long travel takes. The route solver references the network dataset to determine the shortest path between stops.
Note:
If you perform an analysis using ArcGIS Online, the solver references a high-quality, worldwide network dataset stored in the ArcGIS Online cloud and uses ArcGIS Online credits. You can also use your own network dataset stored locally on your machine or use ArcGIS Enterprise to publish routing services using your own network dataset and configure the services with your enterprise portal to consume them from ArcGIS Pro.In this set of steps, add a network dataset to the map.
- In the Catalog pane, which is on the side of the application by default, right-click Folders and choose Add Folder Connection .
The Add Folder Connection dialog box appears.
- Browse to the folder where you placed the tutorial data, double-click Network Analyst, and click Tutorial to select the folder.
- Click OK.
A connection to the Tutorial folder is created.
- In the Catalog pane, expand Folders > Tutorial > SanFrancisco.gdb > Transportation.
- Drag Streets_ND, which has a network dataset icon , onto the map.
The network dataset is added to the Contents pane as well as to the map.
- Right-click Streets_ND in the Contents pane and choose Zoom To Layer to view the San Francisco area.
By default, network datasets built with traffic data show traffic conditions for the current time when they are added to the map. This network dataset includes historical traffic, so you are seeing typical traffic conditions for the current time and day of the week. Not all roads in this network dataset include traffic, so only the ones that do are shown by default.
The area covered by the network dataset is where you can perform network analyses.
Viewing the network dataset isn't required to perform an analysis, so next, you will hide it.
- In the Contents pane, uncheck Streets_ND to display the basemap only.
Next, add one of the network datasets contained within the folder to the map.
Create the route layer
A route layer provides the structure and properties needed to set up and solve route problems. It also contains the results after solving.
- On the Analysis tab, in the Workflows group, click Network Analysis > Route .
The Route layer is added to the Contents pane. It includes several sublayers that hold the inputs and outputs of the analysis.
The route is referencing the San Francisco network dataset because the network was in Contents when the route layer was created.
Note:
To see or change the network data source that will be used to create the network analysis layer, on the Analysis tab, in the Workflows group, you can click the Network Analysis drop-down menu and look under Network Data Source. - In the Contents pane, click Route to select the group layer.
The Route tab appears in the Network Analyst group at the top of ArcGIS Pro.
- Click Route to see the tab's controls.
You will use these controls to define the route you want to generate.
Tip:
The Route tab appears only when you select a route layer in the Contents pane. Also, if you have multiple route layers present, each has its own tab.
Create stops
Think of a stop as a point you need to visit along a journey. The route solver finds the optimal path through the network, connecting the stops you designate.
You could use a feature class of existing stops for your analysis by clicking the Import Stops button ; however, in this exercise, you'll draw your stops directly on the map.
- On
the Edit tab, click Create .
The Create Features pane appears, showing a list of layers that can be edited.
- Under Route: Stops, click Stops.
- Use the Point tool to create a few stops on the map in the area covered by the network dataset.
- On
the Edit tab, click Attributes .
The Attributes pane appears.
- Optionally, select any of the stops you created using the Select tool and edit their attributes, such as Name. If you want to indicate that a stop can only be accessed from the right side of a vehicle, click the CurbApproach drop-down list and choose Right side of vehicle.
Run the analysis
- On the Route tab, click Run .
Tip:
The Route tab only appears when you select a route layer in the Contents pane.
The results show the fastest path through the network, connecting all the stops you created. The stop symbol on the map will show the sequence number in the order the stops were entered and visited by the route solver.
- To create a route that finds the best way to visit all the stops (also known as the traveling salesperson problem), on the Route tab, in the Travel Settings group, choose the Sequence drop-down menu and select the Find Best option.
- Click Run . The resulting route will now show the best sequence to visit all the stops.
Create a barrier
The route you created shows the fastest path through the network that obeys the constraints built into your network dataset. The network may, for instance, have information about speed limits, one-way streets, forbidden turns, and live or historical traffic data. You can modify the behavior of the network by editing your network dataset and also make temporary changes to your analysis using barriers. A barrier is useful for modeling temporary road closures. In this exercise, you'll draw a polygon barrier to simulate an area of road closures and observe how your route changes.
- On the Edit tab, click Create .
The Create Features pane appears, showing a list of layers that can be edited.
- Under Route: Polygon Barriers, click Polygon Barriers.
- Use the Polygon tool to draw a polygon on the map. Make sure the polygon covers at least one street used by the route you already solved.
- On
the Route tab, click Run .
The map shows a different route that avoids the area covered by the barrier you created.
Generate directions
To generate turn-by-turn directions, ensure that the Output on Solve option is checked by default. The directions will not be generated on running analysis if the option is not checked.
- On the Route tab, in the Directions group, click Show Directions .
Driving directions display in the Directions pane. Individual maneuvers are listed in the order performed, and the total time and distance of the route displays at the end of the list.
Explore directions further by using a variety of actions in the Directions pane. These actions are described in the following table:
Action Result Click a route name
The map zooms to the extent of the route.
Point to a stop or maneuver
The location of the stop or maneuver highlights on the map.
Click a stop
The map pans to the stop.
Click a maneuver
The map pans to the starting location of the maneuver.
Double-click a stop
The map zooms in toward the stop.
Double-click a maneuver
The map zooms to the extent of the maneuver.
Route using ArcGIS Online
Routes can be created without using a local network dataset. Follow the steps below to create a Route layer based on an online service. Routes created this way use credits to solve the route.
Note:
To use online services, you must be a member of an organization with privileges to perform network analysis.
- On the Analysis tab, in the Workflows group, click Network Analysis > Change Network Data Source.
The Select Network Data source dialog box appears.
Click http://www.arcgis.com/ and click OK.
- On the Analysis tab, in the Workflows group, click Network Analysis > Route .
The Route layer is added to the Contents pane. It includes several sublayers that hold the inputs and outputs of the analysis.
This second route layer is referencing the ArcGIS Onlineroute service based on a network dataset hosted in the cloud.
- In the Contents pane, click Route to select the group layer.
The Route tab appears in the Network Analyst group at the top of ArcGIS Pro.
- Click Route to see the tab's controls. The Run button has a cloud icon indicating the route will be solved using an online service, not a local network dataset.
- Repeat the steps above to create stops, run the analysis, and generate directions.