In this exercise you will find the best route
for a new access road to the new school. The steps you might follow to produce
such a path are outlined below, and the steps you will take in this exercise are
diagrammed to the right.
Step 1: Create Source and Cost Datasets
Create the source dataset (new school) if necessary. The Source is the school site in this exercise.
Create the cost dataset by deciding which datasets are required, reclassifying them to a common scale, weighting, then combining them.
Step 2: Perform Cost Weighted Distance
Perform cost weighted distance using the Source (school) and Cost datasets as inputs. The Distance dataset created from this function is a raster where the value of each cell is the accumulated cost of traveling from each cell back to the source.
To find the shortest path, you need a Direction dataset, which can be created as an additional dataset from the cost weighted function. This gives you a raster of the direction of the least costly path from each cell back to the source (in this exercise, the school site).
Step 3: Perform Shortest Path
Create the destination dataset if necessary. In this exercise, the Destination is a point at a road junction.
Perform shortest path using the Distance and Direction datasets created from the cost weighted function.
To find the best route to the potential school site, you will first need to create the Source dataset (the school site) from the suitability map, and a Cost dataset, and use these as inputs into the cost weighted function.
1. Start ArcMap with a new project and
add the Suitability raster from Part 1 of the lab and the roads
2. Set up the spatial extend for your project to the landuse layer. Click the Spatial dropdown arrow and click Options. Specify the working directory. Click the Extent tab. Click the Analysis Extent dropdown arrow and click Same as Layer landuse. Click the Cell Size tab. Click the Analysis Cell Size dropdown arrow and click Same as layer elevation since this is the layer with the lowest resolution of the whole project.
3. Go to File > Map Properties, click on Data Source Options and check Store relative Path names to save files in a relative path structure.
4. Save the project as NewRoad.mxd into your folder.
a) Creating the source dataset (location of the new school)
For the area of the new school you will first
create an empty shapefile and then digitize the location of the site.
1. Open ArcCatalog. Connect to your folder in My Documents by clicking on the Connect to Folder Icon . This create a link to your folder in My Documents in ArcCatalog which shortens the access to your folder for future use.
2. In your folder in ArcCatalog, right-click and say New > Shapefile.
3. Name it School_site, and give it the Feature type Polygon.
4. Click Edit and Select, to add a spatial reference. Choose Projected Coordinate Systems > State Plane > NAD 1983 and choose NAD 1983 StatePlane Vermont FIPS 4400.prj.
5. Click OK twice to create an empty shapefile. Now, you can add this shapefile to your project to digitize the location of the new school.
6. Zoom in on area 1 that was deemed most suitable for the new school in part 1 of the lab.
7. Open the Editor Toolbar. Make sure the Target layer is the new School_site layer and the Task is set to 'Create New Feature'. Start Editing.
8. With the Scratch Tool, draw a polygon approximately in the location shown in the diagram below (the exact shape and location do not matter for our lab). Double-click to finish the polygon.
9. Stop Editing and Save your Edits.
10. Remove the Suitability layer.
b) Creating the cost dataset
You will now create a dataset of the cost of traveling over the landscape, based on the fact that it is more costly to traverse steep slopes and construct a road on certain landuse types.
Add the Slope raster from part 1 and also add the landuse layer.
1. Click the Spatial Analyst dropdown arrow and click Reclassify.
2. Choose slope for the Input raster and click Classify.
3. Choose Equal Interval for the classification method and choose 10 classes. Click OK.
4. You want to avoid steep slopes when constructing the road, so steep slopes should be given higher values in the Cost dataset. As the defaults give high values to steeper slopes, you do not need to change the default New Values. Click OK to add the Reclass of slope layer. It shows locations that are more costly than others for constructing a road (higher values indicate the more costly areas that should be avoided).
1. Click the Spatial Analyst dropdown arrow and click Reclassify.
2. Choose landuse for the Input raster and Reclass field.
3. Click the first New value to edit the value and type in the following values:
- Agriculture: 4
- Barren land: 6
- Brush/ transitional: 5
- Built up: 9
- Forest: 8
- Water: 10
Higher values indicate higher road-construction costs.
4. Click Wetlands and click Delete Entries.
5. Click Change missing values to NoData. Click OK to add the Reclass of landuse layer to your project. It shows locations that are more costly than others for constructing a road, based on the type of landuse.
6. The NoData value (Wetlands) is currently displayed transparently so you can see the layers underneath. To make this value solid, change it to white (Layer Properties > Symbology tab > NoData dropdown menu).
You will now combine Reclass of slope and Reclass of landuse in order to produce a dataset of the cost of building a road at each location in the landscape, in terms of steepness of slope and landuse type. In this model, each dataset has equal weighting, so it is not necessary to apply any weight as we did when finding the suitable location for the school.
1. Go to Spatial Analyst > Raster Calculator.
2. Add the Reclass of landuse raster to the Reclass of slope raster by putting following expression in the raster calculator box:
[Reclass of landuse] + [Reclass of slope]. Click Evaluate to create the new raster. Locations with low values identify the areas that will the least costly to build a road through.
3. Rename the new layer to Cost and save it to your directory (right-click on the layer and Make Permanent).
4. Remove all layers except for Cost, School_site, and Roads.
You will now perform cost weighted distance using the Cost dataset you just created and the School_site layer (the source). Using this function, you will create a Distance dataset where each cell contains a value representing the accumulated least cost of traveling from that cell to the accumulated least cost of traveling from that cell to the school site and a Direction dataset that gives the direction of the least-cost path from each cell back to the source.
1. Go to Spatial Analyst > Distance
> Cost Weighted.
2. Click the Distance to dropdown arrow and click School_site.
3. Click the Cost raster dropdown arrow and click Cost.
4. Check Create direction and output it as to Direction.
5. Save the output raster as Distance.
6. Click OK to add the Distance and Direction datasets to your project.
7. Rename the layers to Direction and Distance.
You are now almost ready to find the shortest path from the school site. You have performed cost weighted distance, creating a Distance dataset and a Direction dataset, using the school site as the source. However, you also need your destination point. It should be placed at a location that takes much of the traffic away from the current road and provides a back route to the area for school buses and other vehicles. The location of the destination point has been decided for you in this lab.
1. Add the Destination shapefile
to your project.
2. Go to Spatial Analyst > Distance > Shortest Path.
3. Click the Path to dropdown arrow and choose Destination (the point shapefile).
4. Click the Cost distance raster dropdown arrow and choose Distance (the distance raster you just created).
5. Click the Cost directions raster dropdown arrow and choose Direction (the direction raster you just created).
6. Leave Path type as it is.
7. Save the file as NewRoad.
8. Click OK to calculate the shortest path. The new layer represents the least-cost path (least cost meaning avoiding steep costly for constructing the road) from the new school site to the road junction.
To see exactly where this path should be constructed, you will now create a more detailed map.
a) Creating a hillshade
Creating a hillshade from elevation data and adding transparency gives you a good visual impression of the terrain and can greatly enhance the display of your map.
1. Go to Spatial Analyst > Surface
Analysis > Hillshade.
2. For the Input surface browse for the elevation raster in your directory.
3. Save the new raster as Hillshade. Click OK to create the hillshade.
b) Adding the landuse layer and label the roads
1. Add the landuse layer to your
2. Go to View > Toolbars > Effects.
3. Click the Layer dropdown arrow on the Effects toolbar and choose landuse. Click the Adjust Transparency button and set the transparency to 30 percent. You should now see the hillshade coming through the landuse layer.
4. You will now change the value for the
landuse layer so you can more easily distinguish each landuse type. Bring up the
Properties for the landuse layer.
5. Click the Symbology tab and choose landuse from the Value Field dropdown menu.
6. Double-click each symbol and choose a suitable color to represent each land use type. When finished, close the properties.
7. Bring up the Properties of the Roads layer and go to the Labels tab.
8. Check Label Features, click the Label Field dropdown arrow and choose STREET_NAM. Click OK to close the properties.
Zoom in to the section displaying the new road and create a layout (add a title, your name, scale bar, and other common items you think are appropriate). Export it as NewRoad.pdf and submit it to your Webfolder.
Lab created by Eva Grund, February 2005, based on ESRI's ArcGIS 9 - Using ArcGIS Spatial Analyst manual, Chapter 2, Exercise 3.