GEOG 486
Cartography and Visualization

Part II: An Elevation Surface - data display


A. Hillshading

Being able to depict terrain on a thematic map can add dramatically to the visual appeal of the map. Like all cartographic symbolization though, terrain shading, or hillshading, should be employed in situations where it adds value to the map without detracting from the theme of the map.

Built into the GIS software is an algorithm that allows you to create what is known as a hillshaded image from the Z values of a grid dataset. In our case the Z values are elevation. The algorithm allows you to specify the compass direction (azimuth) from which the simulated sun is shining, and to set the elevation angle (altitude) of the sun above the horizon. Azimuth angles increase from 0, corresponding to North, in a clockwise direction. So an azimuth of 270 simulates the sun shining directly from the west, while an azimuth of 90 simulates the sunshine coming from the east. An altitude angle of 1 places the sun barely above the horizon, while an altitude angle of 90 puts the sun directly overhead. You also are given the option to exaggerate the vertical scale of the Z values. This can be desirable for aesthetic reasons; it makes the relief variation more dramatic. There is also a setting that controls whether portions of the surface that would be in "shadow" are rendered as black.

Hillshading is typically rendered in shades of gray. Lighter areas correspond to the most illuminated portions of the surface. Typically 256 shades of gray are at the disposal of the hillshading algorithm.

See what happens with varied Altitude settings. Vary the Azimuth. Increase the Z-factor. Try setting the Azimuth to 135. For most of us, simulating the sun from this direction (the south-east) causes us to perceive the highs and lows of the terrain in the opposite sense; valleys look like ridges, and vise-versa. This is known as the pseudoscopic effect. Standard practice in both cartography and illustration is to light terrain (or objects) from the upper left, or NW.

  1. Start a new ArcMap session and open a new, empty map document. Or, if you still have ArcMap open, simply click the white New Map File icon on the far left of the main tool bar.
  2. Save the new map document to your Lesson6 folder. Name it gtopo30_equalarea.
  3. Add the eagtopo30_grd that you ended up with at the end of Part I.
  4. From ArcToolbox, open Spatial Analyst Tools > Surface and choose the Hillshade tool.
  5. Go ahead and experiment with creating different hillshaded versions of the eagtopo30_grd grid (i.e. the Input raster), making sure to name and save the Output raster(s) to your Lesson 6 directory.

B. Let's create a mask for all but Oregon

In Part III of the lesson you will concern yourself with symbolizing precipitation data for the state of Oregon. In this section you learn how to make a mask that will cover all of the hillshaded image (and any other layers) except for that portion that corresponds to Oregon. You will use the state boundary of Oregon, a feature class named or_bound_lesson6 that I have provided in the oregon_lesson6.mdb geodatabase. The feature class is in the same map projection as the eagtopo30_grd grid.

  1. Close ArcCatalog. We are going to do some editing and I have found that having ArcCatalog open in this instance may cause problems.
  2. Make all of the layers in your ArcMap session non-visible.
  3. Add the or_bound_lesson6 feature class (found inside the oregon_lesson6.mdb geodatabase) to your map.
    note You will receive a Warning window letting you know that the datum of the polygon feature class does not match that of the other data already present. This is because the GTOPO30 grid dataset is in the WGS84 datum, while the Oregon state boundary dataset is in the NAD83 datum. It turns out the GRS80 spheroid that the NAD83 datum is based on is so similar to the WGS84 spheroid that, in this case, we do not have to worry about the discrepancy. Only if you were doing survey-quality work might you need to be concerned with the difference between NAD83/GRS80 and WGS84 based datasets.
    So, click Close to the Warning.
    In order to create a masking polygon we need a copy of the Oregon state boundary polygon. We are not going to concern ourselves here with the small island polygons that are part of the spatial dataset.
  4. Use the Select Features tool and select the large Oregon state polygon feature.
  5. In the Table of Contents, right-click or_bound_lesson6 and choose Data > Export Data...
    • Export the Selected Features.
    • Use the same coordinate system as the layer's source data.
    • Direct the Output to your oregon_lesson6.mdb,making sure it will be saved as a feature class, and
    • name the new feature class oregon_mask.
    • Add it to the map.
    • Click in the data frame, away from the map, to deselect the Oregon boundary.
    • Look in the attribute table of the oregon_mask layer. You should see only one record. Close the attribute table.
    Now, we need to create the portion of the mask that will cover the portion of the hillshaded image that does not correspond to Oregon.
  6. Add the Editor tool bar to your ArcMap session.
  7. Start an editing session. You will get a dialog box asking you to choose the layer that you want to edit
  8. Select oregon_mask and click OK.
    You will get a window warning you that you have layers that are not in the same coordinate system as the data frame. We will not worry about it... for now, since we know the datums are similar enough for our needs. (Mark those words...)
    Click the Continue button in the warning window.
  9. A Create Features window will open. Click on the oregon_mask layer, which results in a number of Construction Tools appearing at the bottom of the window. 
  10. Keeping the Polygon tool selected, create a rectangular polygon that completely encompasses the hillshaded image.
    When you reach the final point, double-click. ArcMap automatically finishes the polygon feature. The polygon does not have to be a perfect rectangle. But, if you're not satisfied with your polygon shape, make sure it is selected, press the Delete key, then start over.
  11. From the Editor menu, choose Save Edits, but do not stop editing.
    A screen capture to show the green polygon.
    Figure 6.2.1 The green polygon illustrates the sketch you are to create. It will will become the outer boundary of the mask polygon.
  12. Open the oregon_mask attribute table.
    There should now be a second record in the oregon_mask attribute table. Most of the attribute values will be null. The Shape_Area field should show a very large value. Take general note of the value.
  13. Resize the attribute table and slide it to the lower left, leaving the Shape_Area field visible, but not obscuring the map.
    noteThe X/Y Domain: When I created the or_bound_lesson6 feature class, I had to take into account that you were going to digitize this new outer polygon. In order for you to be able to do so, the extent of the X/Y Domain has to be large enough. (Do you recall inputting X/Y Domain extent values when you created the feature classes for your Final Project in Geography 484?)
  14. Make the oregon_mask layer polygons hollow.
  15. With the Edit Tool, click in the data frame, away from all features, to deselect the new, large sub-rectangular polygon you just created.
  16. Select the Oregon state boundary polygon that is part of the oregon_mask layer. MAKE CERTAIN that you do not select the state boundary polygon from the or_bound_lesson6 layer. (There are two ways to be certain you do not select the original Oregon state boundary. Do you know what they are?)
  17. From the Editor dropdown menu, choose Clip....
  18. In the Clip window that appears, leave the Buffer Distance at 0, and have selected the Discard the area that intersects radio button. Click OK.
    One of two things should have happened. Either
    (1) you did not succeed in performing the clip. A message appeared that claims there are no features coincident with the selected feature.

    Screen captures to show the "clip" error message and the attribute table of the oregon_mask layer.
    Figure 6.2.2 The error message you should receive when you attempt to clip. Also shown is the attribute table of the oregon_mask layer.
    We know otherwise; the large polygon we just created is coincident with the one we selected. So, perhaps we are running into a manifestation of the problems we were warned of, regarding the coordinate systems (datums), when we initiated the editing session.
    (2) the clip operation succeeded, evidence of which can be seen in the Shape_Area field of the attribute table; it should have been revised to a smaller value.
    IF THE CLIP OPERATION FAILED, let's take care of it. Perform the following Steps: 19-28. Otherwise, if the clip operation succeeded, skip ahead to Step 29.
  19. Stop the editing session.
  20. Remove the oregon_mask layer from the ArcMap table of contents.
  21. Via the Insert menu, add a new data frame to the ArcMap session.
  22. To this new data frame, Add the oregon_mask feature class. This way, there is only a single dataset in the data frame, insuring that there will be no conflict when it comes to different datums.
  23. Symbolize the polygons as hollow - no color fill - so you can see both the outline of the state boundary polygon and the large sub-rectangle.
  24. Also, open the attribute table and reduce it in size so you can see the map display area. Make it so that you are able to see the Shape_Area field.
  25. Start an editing session.
  26. Select just the state boundary polygon.
  27. Note the value in the Shape_Area field of the record corresponding to the larger polygon.
  28. From the Editor dropdown menu, choose Clip... Leave the buffer distance as 0, and choose to discard the intersecting areas. Click OK, and watch what happens to the Shape_Area field of the larger polygon. You did not get an error message this time, right? Continue with Step 28.
    If the original attempt to perform the clip operation worked (Step 17), proceed from the following step.
  29. Change the symbolization so that the polygons in the oregon_mask layer have a fill color.
    The state boundary polygon should be filled, along with the outer polygon. Nothing was really discarded, regardless of the radio button choice we made above. You also saw that when you completed the clip operation, there were still two records in the attribute table.
  30. The state boundary polygon in the oregon_mask layer should still be selected (make certain that it is, and that the outer polygon is not).
  31. Delete the state boundary polygon by simply hitting the Delete key, or right-click > Delete. (If nothing happens - if the Oregon state boundary polygon does not disappear - you may have to deselect it then reselect it.)
    You should now see white space where Oregon used to be, or a hillshade or your grid will be visible if you have those checked in the TOC.

    A screen capture to show the Oregon-shaped donut hole.
    Figure 6.2 3 The successfully-created mask polygon. The cut-out of Oregon has been deleted, leaving an Oregon-shaped donut hole. Note that there is a single record remaining in the attribute table.
  32. Save your edits and stop the editing session.
  33. If you had to perform Steps 18-27, remove the New Data Frame from your ArcMap session, and Add the oregon_mask feature class back to the original data frame.
  34. Make one of your hillshaded layers visible.
  35. Now, if you symbolize both the polygon fill and the outline of the oregon_mask layer as white, it should allow just the portion of the hillshaded image covering Oregon to appear against a white background. (When you do, because the background color of the table of contents is white, you cannot see the legend symbol beneath the name of the layer. But it is still there; you can click on it.)

noteA case where we can cheat and just change the coordinate system definition: In the Note above, in Step B-3, I mentioned that the WGS84 spheroid and the GRS80 spheroid, upon which the NAD83 datum is based, are essentially the same. One way that we could have avoided the problem we encountered when we attempted the clip operation in the original data frame would have been to simply redefine (not reproject) the coordinate system of either the grid or the Oregon boundary layer so that they were both the same, down to the datum level. In this case we can get away with just changing the definition of the coordinate system since the spheroids upon which the original coordinates are based are so similar.

C. Contour

With a GIS surface dataset comprised of regularly-spaced points (our elevation grid) at our disposal, we can take advantage of the contouring capability.

  1. Zoom in so that Oregon fills your map display area.
  2. From ArcToolbox, open Spatial Analyst Tools > Surface and choose the Contour tool.
  3. Provide values for the various pieces of information requested in the Contour dialog window:
    • There are two choices (or more, depending on how many hillshaded images you have) under Input surface. Does it make sense to contour the values in the hillshade image? Do they represent the elevation values? No. Choose the elevation grid - eagtopo30_grd.
    • From the range of the elevation values shown, choose a reasonable contour interval.
    • Use the navigation icon next to the Output polyline features: slot, to name the output appropriately - include the contour interval perhaps, and to determine where you are going to save the contours.  If you save the output to oregon_lesson6 geodatabase, the contours will be saved as a geodatabase feature class. If you save the output to your Lesson 6 folder, the contours will be saved as a shapefile. Either option is fine.
  4. Click OK. The contour layer will automatically display. (Depending upon the interval you specified, this step may take a few seconds.)
  5. In the table of contents you may have to move the mask layer above the new contour layer in order to cover the lines that do not pertain to Oregon. (The oregon_mask should be the top layer.)
  6. Experiment with different contour intervals if you wish.

    Try This! (Optional)

    The University of Oregon Libraries has a well-made interface for downloading 1:24,000 USGS DEMs. Follow the steps below to retrieve a 1:24,000 DEM and process it for use in ArcGIS.

    Go to Downloadable GIS Data from the MAP Library

    • Under the Local Base Data heading, click the via Graphical tiles link under the bullet for 1:24,000 DEMs.
    • Click one of the hot counties in the northwest portion of the state.This will take you to a well-designed map displaying the extents and names of the various 1:24,000 topo quads for that part of the state.
    • Select one of the quadrangles by clicking on it. That will take you to a page where you can...
    • click the >DEM link, which will allow you to download a .zip file.
    • Unzip the file you downloaded. It will contain a single .DEM file. Extract the .DEM
    • Take a look at the raw dem data by opening the .DEM file with Wordpad or Notepad (In Notepad turn off Format | Word Wrap to see the true representation of the data records.) The USGS DEM files have the header built into the top of the file.
    • Open ArcToolbox
    • Expand the Conversion Tools
    • Expand To Raster
    • Double-click the DEM to Raster tool
    • Interact with the dialog box that comes up to convert the DEM to a Grid dataset. (Most USGS DEMs are integer. Search to see if information is available at the University of Oregon Libraries website.)
    • You should now bring the new grid into an ArcMap session containing the Oregon data you have been working with. You may have to do some hunting to find the new grid—it'll be small compared to the whole state of Oregon. It is surprising to see how many 1:24,000 topo sheets it takes to cover a state.
    • Hillshade the new 1:24,000 topo quad
    • Zoom in and compare the resolution of the data with the GTOPO30 data.

That is it for Part II

You have just completed Part II of this project.