Route Calculations using ArcGIS Pro Networking tools and some advanced geoprocessing

 

Overview

In this scenario, the BLM has decided they want to create 10 random study sites for data collection in western Utah. In order to get a good, unbiased distribution of sites, they’ve decided to hire you for your powerful ArcGIS Pro skills to create those random sites, then route the most efficient path between the sites and calculate travel time for the field crew. You will also generate directions for them as they are pretty helpless.

Here’s a brief overview of the steps you’ll take. Challenge yourself to complete this analysis without the detailed instructions.

  1. Start with 1000 randomly generated points within the area of interest
    • Final plots must be will have a half kilometer diameter
  2. Select the sites that are fully within BLM land
  3. Sites must be within 500 meters of a road
  4. Sites must be at least 100 meters away from a road
  5. Further reduce to remove sites that are near municipalities
  6. From the remaining suitable locations, generate a random subset of 10 sites
  7. Use Network Analysis to map the most efficient route, calculate total driving time from and back to the nearest BLM field office
  8. Oh, and don’t forget the driving instructions

 

Provided data: 

  • AOI.shp (Belmont)
  • LandOwnership.shp (https://gis.utah.gov/data/cadastre/land-ownership/)
  • Municipal Boundaries (https://gis.utah.gov/data/boundaries/citycountystate/)
  • Utah Street Network Analysis (https://gis.utah.gov/data/transportation/street-network-analysis/)
    • Road_network
    • This is a complex dataset that has been retrieved and clipped down to the area of interest for you.

 

Let’s get started!

 

Create a geoprocessing_outputs folder on your local drive.

Download and unzip the data file from Canvas into your geoprocessing outputs folder.

Start ArcGIS Pro, then:

  1. Under New, click the Map template.
  2. In the Create a New Project window, for Name, type Geoprocessing.
  3. For Location, browse to and choose your Geoprocessing_Outputs folder.
  4. Uncheck Create a new folder for this project and click OK.

new folder

Add the data provided to you.

Turn off the visibility of all map layers except the AOI (area of interest) polygon.

This lab serves as a refresher for the Advanced GIS course at USU. These step-by-step reminders won't be included going forward.

Step 1: The first step is to create the initial random site locations within area of interest (AOI).

Use the tool “Create Random Points”

From the Analysis tab, in the Geoprocessing section choose Tools to open the geoprocessing search window.

  • Use this tool to create 1000 random points distributed within the area of interest polygon.
  • The first parameter is asking you for the name of the folder to which you will save your points.
    • Browse to your files and create a new folder called “output_geoprocessing” or something along those lines. This will serve as the folder for all the data you will be creating in this exercise.
    • Remember: No spaces in the folder name!
  • Second parameter is the name for your new point file. Keep it simple.
    • Suggestions: “Init_pts” “onek_pts” “points”
  • Third parameter is the constraining feature. Add the AoI polygon here.
  • Number of points = 1000 points

 

Run

             Create Random Points

Step 2: Select points on BLM land

 

Steps in brief:

  • Select BLM polygons
  • Buffer 50 meters inside
  • Select points within the slightly decreased BLM area

 

Thinking ahead, we know the 20 meter diameter sites need to be entirely on BLM land, so let's decrease the area of the BLM land by 50 meters to make sure we are moving foward with a suitable area.

First: Select BLM polygons

Open the attribute table for LandOwnership.

Open Select by Attribute in the table.

Select by Attributes

 

Create a new expression where Agency = BLM

 select by attribute agency is BLM

 

Second: Buffer inside the BLM selection

 

Open the Pairwise Buffer tool.

Use a negative Distance Value. 
I'm choosing 50 meters for an inside buffer somewhat arbitrarily. 

Pairwise buffer setup

Evaluate the results.
Clear your original selection and zoom in. 


verifying the inside buffer

 

Shown below - the original BLM areas in yellow and the smaller buffered area in blue.

Pairwise results

 

WOW!
While it is GREAT to know how to make an inside buffer, it is even better to know that you can do a Select by Location using a negative value for your search distance!


negative select by location

 

Third: Choose the points that fall within the reduced BLM area. 

There are many ways to do this:

  • Select by Location
  • Clip
  • Intersection

 


If you use Select by Location, create a layer from the selection.

Make Layer from Selection

 

Evaluate the selection by:

  • Opening the 1000 point attribute table and identifying how many points are selected
  • Zoom and panning around the map to see if the points are indeed sitting on BLM land.
    • Turn off visibility of competing layers so you can really see what is going on.

 


You now have a subset of random points within BLM land.

 

Step 3: Removing points within 100 meters of a road

 

Clear all selections.

 

Use Select by Location to select points that are within 100 meters of the roads layer (road_network_aoi)

Delete these points.

Check totals in the attribute tables to verify you are reducing the number of random points.

 

Step 4: Ensuring points are not near a municipality


 

Use the Municipal Boundaries dataset to remove any points within one kilometer of their boundary. 

 

Step 5: Choosing a random subset of 10 site points from the remaining point


Use the Subset Features tool

  • Name the Output training feature class to signify that these will be the final 10 sites.
  • You don’t need to name an output test feature class

Subset features

 

You should now have a shapefile containing 10 valid sites.

Verify that the results are correct by zooming in and measuring distances to roads, BLM boundaries, and municipalities.

 

Step 6: Calculate the most efficient route from the nearest BLM field office to each of the sites.


 

First find the location of the BLM Field Offices.

Search ArcGIS Online for “Utah BLM office"

Filter by Title. You might have to scroll to find it. You may need to adjust your search terms.
The name of this dataset may have changed. Experiment. You will know you have the right data if you have points representing BLM field offices in Utah.

Add Data button:

ArcGIS Online

Inspect the locations and find the nearest field office to the area of interest.
Notice there is an office in Fillmore, on the east side of the AoI.

 

Merge the field office into the site locations layer

Select the Fillmore field office point on the map or from the attribute table.

With that BLM field office point selected, you can Merge the two point datasets.

Run the Merge tool and merge this point with your 10 sites points.

You are doing this so that the field office is in the same dataset as the site locations and can be included in your network routing calculations. 
You CAN merge them because the geometries are the same (point and point).

 

Route Tool

 

Use the Route tool in the Network toolset to create an efficient path between sites.

Heads up!
You have to be logged in to ArcGIS Pro using your A# email address user name to have access to the Network tools.

 

In the Analysis tab, click the Network Analysis drop down:

Network tools

In the Contents pane, click Route to select the group layer.

Route Layer appears as a new option at the top of ArcGIS Pro.

Click Route Layer to see the tab's controls.

view of route toolbar

You will use these controls to define the route you want to generate.

 

Pro Tip
The Route tab appears only when you select a route layer in the Contents pane. Also, if you have multiple route layers, you can change the settings of the layers individually or select the multiple layers to edit the settings for all the selected layers if they share the same network data source.

 

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 will use the feature class of site and field office locations as stops for your analysis by clicking the Import Stops button.

Leave the first two parameters but add the point file containing the 10 sites and field office point file as the Input Locations parameter.

 
   

Run the analysis

  1. On the Route tab, click Run.

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.

  1. 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.
  2. Click Run . The resulting route will now show the best sequence to visit all the stops.

The section marked above was taken from https://pro.arcgis.com/en/pro-app/latest/help/analysis/networks/route-tutorial.htm

 

Force the Field Office to be the first and last stop, creating a loop route.

 

Use the Edit tools to add a second point next to the field office.  The Route tool will use one point as the field office starting point and the other as the field office ending point.

Edit tab > Features section, press Create to open the Create Features window.

Select the merged point file (the one with your final 10 sites and the Fillmore field office location).

Click on the map next to the Fillmore field office point to add the second field office point.

 

Create ID values you can use to sort the locations to ensure the field office is both the first and last stop.

Open the attribute table to edit the ID field.

If you don't have an unpopulated ID field, use the CID field or add a new field that you can populate with integers.

In the field, enter “1” for one of the field office points and “3” for the other field office point. 
1 is the starting point and 3 is the ending point.

 

The remaining points can remain unranked but should fall numerically between the first and last stop. So assign then all “2”. That way the Route tool can choose the best order to connect the stops.

Shortcut: Using the shift key highlight the remaining 10 points.

Right click on the ID field header > Calculate Field.

Set the Field Name to ID and enter “2” in the parameter window like you see in the image below. 

Field calculation shortcut

 

SAVE ALL EDITS

(...not the Project, the Edits)

 

Rerun the Route tool to create the loop.

 

This is important - to run the Route tool again with respect to your new ID values, you need to create a brand new Route.

Create a new Route
(Analysis tab > Network Analysis > Route)

This time before running the calculation, tell the Route tool to preserve the first and last stops.

In the Travel Settings section of the Route ribbon, set the Sequence to “Preserve the first and last stop”

preserve first last stop

Add Stops again

               In the Advanced Drop Down, set the Sort Field to “ID” (or whatever field your 1, 2s, and 3 are in).

Run.

You should see your route change to a loop.

If you don't, scroll up and make sure you are Creating a New Route.


Save your project.

Turn off unnecessary layers

Take a screenshot of your route for submission.

 

Determine drive time and directions

 

From the Route tab, Directions section, press Show Directions.

Scroll to the bottom of the directions to find the total time and distance calculations:

Directions

 

 

What to Submit

 

  1. Synthesize the tasks in the exercise.
  2. In a bullet list, present the major tasks and any new skills acquired.
  3. In your own words, demonstrate your understanding of the workflow
    1. How do you know the critical steps 'worked'? 
  4. Screenshot of your final loop route
  5. Screenshot of the Total Time and Total Distance from the Directions window (similar to above)