ArcMap Raster Intro Lab

Due in two weeks

Objective: The objective of this lab is to use some classic raster manipulations to begin 'thinking in raster'. You'll use some of ArcMap's raster modeling capabilites. These are provided mainly via the ArcToolbox - Spatial Analyst Tools . In this lab you will:

  1. Import a DEM and experiment with some of ArcMap's terrain visualization and analysis functions (calculate contours, slope, aspect, and hill-shaded rasters).
  2. Use some more general raster GIS functions (reclassify and raster calculator) to do a simple terrain-based site suitability analysis.
  3. Gain further experience with raster mode analysis with Spatial Analyst's hydrological analysis facilities.
  4. Convert several vector datasets into rasters showing feature locations and showing distances to features.
  5. Gain further experience with 'thinking in raster mode' using Spatial Analyst's cost-distance and least cost path facilities to model routes from block centroids to schools.

Data Needed

Preliminaries (the set-up):

  1. download the honolulu.dem file from laulima
  2. (After starting ArcMap...) Make the Spatial Analyst extension available by clicking "Customize" in the oain menu, selecting "Extensions.." and making sure that "Spatial Analyst" is checked.
  3. Create a new file geodatabase in your file space (U:\). Opening ArcCatalog, under your folder connections create a new file geodatabase. Then, right click on it and make it your default geodatabase. (It should then be the default for finding and writing files and for scratch space. Very handy.)
  4. The controls for setting environment variables/options for the various Spatial Analyst Tools, is under the "Environments..." button. Set several things... "Processing Extent" to "union of inputs" or to match a data set or to another useful extent... and under "Raster Analysis" set "Cell Size" to something specific or "same as " or to "minimum of inputs" (setting it really small makes for lots of data and slower processing).

Displaying and Messin' wi' DEM Data

Read Arc's He lp documents on "Overview of Spatial Analyst" and "Overview of the Surface Toolset".

To Import a DEM: Use ArcTools the Red Toolbox icon and select the DEM to Raster Tool...
ArcTools -> Conversion Tools -> to Raster -> DEM to raster.
In the dialog, set the input to be your copy of the DEM data. Set the output to be in your new default geodatabase...
(like) U:\388\Default.gbd\demrasta
The output defaults to "float" and the vertical exageration to "1", and those work ok. Run it. It might take a few seconds. demrasta should show up on your map.

Derive Contour lines, and Slope, Aspect, and Hill-Shaded (shaded relief) rasters from the DEM data. The Tools are available as the
Arc Toolbox -> Spatial Analyst Tools -> Surface -> Contour, Slope, Aspect, and Hill-Shade tools. Make and examine the maps and answer the following questions.

What does each of these renderings highlight in the data? What contour interval seems reasonable? Why? Which rendering gives you the best overall impression of the terrain configuration? Why? What doesn't it show well?

A Site Suitability Example Using classic Raster Manipulations

A lot of raster analysis can be done using a couple of simple operations. One is 'reclass' the other is to do cell by cell arithmatic operations, such as adding, subtracting, multiplying and dividing the values in corresponding cells. Judicious combination of the 'reclass' and such calculations form the back-bone of raster analysis.

The operations are avaialable as:
Arc Toolbox -> Spatial Analyst Tools -> Reclass -> Reclassify... (set input, set value reasignments)
Arc Toolbox -> Spatial Analyst Tools -> Map Algebra -> Raster Calculator... (set what to calculate)

Suppose that you want to find a place on the Honolulu Quadrangle to build a new school. The site has to have moderate slope, an east-facing aspect, and an elevation that would avoid tsunamis and sea-level rise but not be really high for students to climb to. (A more realistic site analysis might also include information on the locations of students, existing schools, transportation infrastructure etc., but we needn't worry about those things today.)

You might approach this task by reclassing each of the elevation, slope, and aspect maps into areas that are suitable and those that are unsuitable according to some criteria. Then combining (overlaying?) these three layers should indicate the areas where all three are suitable.

One strategy is to create three binary rasters each showing "suitable" vs "not-suitable" cells, coding "suitable" as "1" and "unsuitable" as "0", and then combine the three rasters (by either adding or multiplying) to find the suitable places for schools. Obviously, this requires that you set (perhaps arbitrarty) bounds on what is "suitable" and "unsuitable" based on interpretations of the criteria. For instance, one might decide that aspects must be between 45 and 135 degrees, slopes must be <10 degrees, and elevations must be between 80 and 200 feet.

You could then combine these rasters by multiplication (in the raster calculator) to get a map where '1' indicates places that are suitable on all three criteria, and '0' indicates unsuitable sites. Or you could combine then by addition and get a map that has '3', '2', '1' or '0' in each cell depending on how many of the criteria were met in each raster cell.

Try both of those methods. Compare the results in a few sentences, i.e., do you get very different suitable areas when you try different schemes in your reclassifications and combinations? Plot maps showing the results. What two places would you suggest as suitable alternative school sites?

NB That is a fairly simple minded way of combining factors; as if all were equally important and not traded off against each other. A more appealing strategy would be to develope ways to rate and weigh the factors differently. The AHP method that Dr Ridgley teaches comes to mind. In any event, careful attention to your coding scheme, the operations on it and the interpretation of the results are in order. The analysis is quite sensitive to the coding and weights of the various layers and the ways that they are combined.

A foray into hydrological analysis

One of the important uses of DEM data has been to support hydrological studies. ArcGIS has a considerable suite of capabilities for this. In ArcGIS Desktop Help, search for "An overview of Hydrology tools" and read about "Basin", "Fill", "Flow Accumulation", "Flow Direction", "Sink", "Stream Order", "Watershed", etc.

To calculate the set of drainage basins on your DEM data, use the "Fill", "Flow Direction", "Basin" tools under:
Arc Tool Box -> Spatial Analyst Tools -> Hydrography -> ...

Run the Flow Direction tool on your DEM data, and run Basins on the output from that. Then, run the Fill tool on the DEM and Flow Direction and Basins in sequence. Remember to set your cell size and processing extent for each tool.

To better display the basins you might try putting them over the hillshaded layer:

  1. make them about 50% transparent (properties of the layer)
  2. symbolize them as unique values
  3. pick a 'fruits and minerals' color scheme
  4. display the hillshade of the terrain under them
Cool, huh? Examine the basins and write a sentence or two on whether the result seems plausible given your understanding of the area's terrain and hydrography.

You could use the DEM with the reclass and raster calculator to get rid of the odd artifacts (maybe set everything at 0 or less elevation to "NoData" and multiply the basins layer by that? or) by setting an "analysis mask" in the environment.

Converting Vector to Raster Data

ArcMap has several ways to make raster data from vector data. For any of them, you need to watch/set your cell size and processing extent in the tool panel and the "Environment" button's list of settings.

The simplest methods are in the:
Arc Tool Box -> Conversion Tools -> To Raster -> ...
where you'll find "Feature to Raster", "Polyline to Raster", "Polygons to Raster" etc. Each of these puts a value from a vector feature's data table into each raster cell that the feature touches.

Other tools put various kinds of distance related values in the cells of the raster. Look at the tools under
Arc Tool Box -> Spatial Analyst Tools -> Distance -> ...
and you'll find "Euclidean Distance" among several others.

Dig-in and convert a few vectors to raster representations...

Use the "Feature to Raster" tool to build a raster of the "STREET_CLA" values from the cc-streets shapefile in which the cell size and raster extent match the Honolulu DEM Raster.

Use the "Point to Raster" tool to build a raster of the population values from the 2010 Census Tract points data shapefile with the cell size and raster extent matching the Honolulu DEM Raster.

Use the "Euclidean Distance" tool. and your 2010 Census Tract points shapefile and build a raster of distances to those points that has the same cell size and extent as your Honolulu DEM raster.

Use the "Euclidean Distance" tool. and your cc-streets shapefile to build a raster of distances to the streets that has the same cell size and extent as your Honolulu DEM raster.

Describe what each of these operations produce.

Calculating Cost-distance surfaces and least-cost paths

Let's use ArcGIS to do some cost-surface modelling.

First, get your bearings by reading the help on "Understanding cost distance analysis".

Then, let's try to model how we might get injured students from schools to hospitals most efficiently using the roads on Oahu. We might conceptualize this as injured students sledding (he'e holua) "down hill" to the nearest hospital on a surface of accumulated distance from the hospitals. The round bowls of accumulated distance around the hospitals are distorted by the street network, which imposes different costs of traversing space related to the kinds of the roads in the cells.

We can derive a cost surface from the street data. The cc-streets STREET_CLA data uses integers to code road classes, but the classes are not coded "ordinally". Side streets are "1", freeways are "2", cane haul roads are "6" etc. (You should examine the data to see what is what). They will need to be reclassed to reflect the cost or impedance to pass through each cell. One could "calculate" a new field in the attribute table of the feature data to reflect realistic costs to use in making the raster, or one could convert the codes to raster and then reclass or calculate in the raster to reflect the cost. Cells off the roads should be higher impedance than cells on the roads, but maybe not the infinite impedance as the "NoData" code will be.

  1. Make a cost or friction surface for Oahu from the cc-streets data as suggested above. Its extent should include the whole island. The cell size might be the default or 100 meters or so.
  2. Calculate the (accumulative) cost-distance surface from your 'hospital' points using the cost raster created above as the "cost raster". (Spatial Analyst Toolbox -> Distance -> Cost Distance), with in_source_data = 'hospitals', in_cost_raster= 'the cost surface you just made', specify an out_backlink_raster and the out_distance_raster to create.
  3. Find the shortest paths from your schools to your hospitals. (Spatial Analyst Toolbox -> Distance -> Cost Path), with in_destination_data = 'schools', in_cost_distance_rster = 'the distance raster you just created above', in_cost_backlink_raster = 'the backlink rster you just built above', path_type = "EACH_CELL", and an out_raster to hold the result.
  4. That should have produced a raster showing the set of set of least-cost paths from your schools to your hospitals.

Print your least-cost paths map and write a sentence to two describing what it means.


Answer the questions in bold type above.


Help - is on the main menu.

Topics like "flowdirection", "distance", "cost-distance" and "least-cost" in Spatial Analyst will get you where you need to be.

Set the environment variables.