SRTM 30M and NED 30M Digital Elevation Models

SRTM 30M and NED 30M Digital Elevation Models

SRTM 30m Digital Elevation Models:

Downloading and processing from seamless.usgs.gov/Run.htm

Nathan A. Toké

01/22/04

Table of Contents

  1. Introduction
  2. Downloading data sets using seamless
  3. Unzipping and organizing seamless files
  4. Importing files into ArcMap
  5. Projecting grid files
  6. Reducing grid file size
  7. Merging grid files
  8. Using hillshade and color ramp visualization
  9. Comparing SRTM and NED data sets in terms of slope tendencies
  • Step 1 – a common DEM projection
  • Step 2 – calculating slope files
  • Step 3 – slope files integerized
  • Step 4 – clipping slope files to one another
  • Step 5 – converting raster (grid) to features (shapefile)
  • Step 6 – exporting slope points as .txt
  • Step 7 – using Vi to clean .txt files
  • Step 8 – using Mat Lab scripts to compare the data

Introduction

This document is a tutorial describing how to download and process DEM data from the USGS web site (seamless.usgs.gov) using the ESRI products: ArcMap, ArcCatalogue, and ArcToolbox. I downloaded the Shuttle Radar Topography Mission (SRTM) 30m data for the Rocky Mountain GEON test bed; which extends in latitude from 31 to 49 degrees north and in longitude from 103 to 115 degrees west. In this document I will describe how I downloaded, unzipped, and organized these files. Then I will discuss how to import grid files into ArcMap, reduce file size, re-project, merge, rename, and hillshade the SRTM 30m grid files. Finally, I will describe how to calculate slope files from the DEM data and one way in which I compared SRTM slopes to NED slopes over the same geographical space.

Downloading files from seamless

SRTM 30m, NED, and many other useful GIS datasets are available for download from seamless.usgs.gov/Run.htm. The data are available by several methods of selection. The selection options are on the left side of the seamless viewer. I chose to use the define area by coordinates option because I needed to download a specific area (figure 1).

Figure 1: Define area by coordinates allows you to select a specific area for download (right window).

When selectingan area for download,seamless returns multiple zipped files that make up the area of selection. The amount and the size of these files vary depending upon the area you select, so it is best to select an area of consistent size and range, this way the zipped files will be the same size and their boarders will align. I consistently selected areas of 1 degree of latitude by 12-degree strips of longitude, from 103 to 115 degrees west (the width of GEON). This returned 8 zipped files for download, each file had dimensions of 1 degree of latitude by 1.5 degrees of longitude (figure 2). I limited the selection area to these increments because seamless requests that you pay for the data to be sent by CD if the selection area is greater than 100mb of zipped data (about 30 square arc seconds for the SRTM 30m data).

Figure 2: After defining and area by coordinates, seamless breaks the download area into zipped files. Each file covers a discrete area. Using the same coordinate dimensions for each selection will provide consistent file dimensions. In this case 8 files (each 1 degree of latitude by 1.5 degrees of longitude) completed the area of selection that was one degree of latitude by 12 degrees of longitude.

To complete the download click download on the desired zip file. Seamless opens a pop up window that displays the data retrieval progress. Eventually a file download window will appear (figure 3), seamless will select a random numerical file name. At this point it is important to change the file name to one corresponding to the geographical area of the file, I chose to name files according to their range in latitude and longitude. It is also important to save the zip files to folders corresponding to that name, I chose to bin the 8 zipped files for each 12-degree strip of longitude into a folder named according to that strip’s latitudinal range.

Figure 3: Upon clicking download for one of the desired files (figure 2) a window will appear that shows you the file retrieval process from seamless (background). Once the file is ready for download the above option will appear (foreground). Remember to name the files and store them in a systematic way that makes them easily identifiable with their geographical location.

Unzipping and organizing files

The zip files downloaded from seamless can be unzipped using WinZip or a similar program. Double click the zipped file and WinZip will unzip it. Then extract each grid file to a predetermined location, maintaining file organization (keep each file in a folder corresponding to its geographical location). This is important because the unzipped files will have a random numerical name. To deal with this problem I stored the files in folders corresponding to their latitudes. I then renamed each file in ArcCatalogue according the lower bounding latitude and upper bounding longitude. Example: An SRTM30m grid file from 31-32 degrees north and 110.5-112 degrees west would be named srtm_31_112. (*Note: file and folder names should not have spaces since ESRI scripts do not deal with spaces well) Once unzipped, the grid files should always be manipulated (renamed, moved, or deleted) using ArcCatalogue because ArcCatalogue will optimize file organization, keeping track of and protecting changes that may affect the files’ ability and efficiency for use in the Arc products.

Importing files into ArcMap

Open ArcMap. Under the file menu and select add data, or select the add data icon on the ArcMap display. In the add data dialogue box, navigate to the folder containing the grid file to import, select this file and click add. You may add multiple files to your map. It is useful to add a reference (shape file) layer under the grid files. Most useful are political boundary maps or maps displaying natural boundaries such as water bodies. These types of files can be downloaded from sites similar to seamless. I used a US states shape file from the national atlas digital GIS warehouse:

Projecting files

The files you downloaded from seamless may have a different projection than you would like to use when viewing the files in ArcMap. The usefulness of a projection depends upon several factors including what you will use it to view, the geographical location of the file, and the projection of any other files to be used in conjunction with the file you are adding. To change a file’s projection first open ArcToolbox. In ArcToolbox open data management tools, under that toolbox open the projections toolbox and double click on project wizard (coverages, grids) (figure 4). (Do not use define projection wizard because this option only renames the projection, it does not actually change it).

Figure 4: Opening the Project Wizard in ArcToolbox.

In the project wizard you may choose to project a data set to a specified coordinate systemor you may project the data set to match existing data. For the first file you should select Project my data to a specified coordinate system and click next (figure 5a). Now you must select the dataset for which you would like to project a coordinate system. Click the folder icon (figure 5b) and navigate to the SRTM dataset. ArcToolbox will list the parameters of the SRTM file’s current projection (SRTM30m grid files come projected in WGS 84). Click next. The next dialogue box (figure 5c) asks you what projection you want your data to have. In this example, I would like to project the file in UTM coordinates. To do this scroll down the projections list (they are in alphabetical order) and select UTM, click next. In the next dialogue box you must choose several UTM parameters (figure 5d). Make sure the units = meters and the leave the x and y shift at zero. You must choose a UTM zone for your SRTM data. This is based upon the geographical location of your dataset. To select the correct zone find your dataset location on a UTM zone map, one such map can be found at Now a datum must be applied to the dataset (figure 5e). In this case I used NAD 27 – CONUS (North American Dataset 1927, Continental US). Scroll down and select which datum you desire and click next. You must now specify an output dataset (figure 5f). When specifying an output file make sure to save the file as a grid type and maintain organization by naming the file geographically. Click next, if the projection information you desired matches the summary click finish. The dataset with its new projection is now complete. If the grid file is large the final step may take several minutes, be patient!

At this point it is useful to make sure that the projection has been defined correctly. One way to check this is through ArcCatalogue. Open ArcCatalogue and navigate to the file that you defined the projection for. Right click on this file and select properties. Under spatial reference the projection reads Transverse_Mercator because I selected a UTM projection, the projection should match whatever you defined. It should not read GCS_WGS_1984, which is the projection that the SRTM data comes with.

To change the projections of your remaining SRTM data you may now choose project the data set to match existing data in the define projections wizard (figure 6a). This may be done as long as the datasets are within the same UTM zone, if this is true click next. Now select a grid to project and click next (figure 6b). Now you must select a grid that you wish to match the projection to, the coordinate system’s parameters should appear below and match the projection you desire for your dataset (figure 6c), click next. You must specify an output dataset (figure 6d). Remember to save the file as grid type and proceed. Now a summary of your projection input is displayed (figure 6e). If everything is in order, click finish and a new grid file with this projection will be created. Continue this process to define the new projection for each of your data sets remembering to define the correct zone for each of the datasets. Periodical checking of projections in ArcCatalogue is a good idea.

a) b)

c) d)

e) f)

g)

Figure 5 (a-g): Steps to follow in defining a coordinate system interactively.

a) b)

c) d)

e)

Figure 6 (a-e): Steps to follow in projecting a grid to match existing data.

Reducing SRTM30m Grid File Size

Each point of the SRTM30m grid files is assigned an elevation value (in meters) with many insignificant digits (figure 7). The presence of these extraneous decimal places over the entire grid file increases each grid file by several orders of magnitude. To reduce the file size the grids can be manipulated in raster calculator to produce copies consisting of only integer point values. This maintains precision at the 1-meter level, which is still more precise than the 10-meter vertical confidence interval for the SRTM data.

Figure 7: SRTM_48_115 grid file, projected in ArcMap. Notice the highlighted layer’s range of elevation values. The SRTM data is assigned too many insignificant digits. This increases the file’s size by several orders of magnitude. I fixed this disk space problem by using raster calculator and the integer function to produce grid file copies without any decimal places. The range in confidence of the SRTM data is 10 vertical meters.

In ArcMap, add an SRTM30m grid file: example srtm_49_115 (figure 7). This 1-degree of latitude by 1.5-degree longitude file is roughly 80mb in size (with pyramids drawn). Under the “Tools” menu, open “extensions”. Make sure that the spatial analyst tool is available (figure 8a). Then open the spatial analyst toolbar: under the “View” menu, select toolbars and then spatial analyst to open the toolbar (figure 8b).

a) b)

Figure 8: Steps for opening the spatial analyst toolbar: a) turning on spatial analyst, b) opening the toolbar.

Under the spatial analyst toolbar (figure 9), select “Options”, at the bottom of the menu. In the “General” tab of “Options” Pick a working directory where you want to store files created by spatial analyst (figure 10a). Select the “Extent” tab and pick “Intersection of Inputs” since you will be using raster calculator to make a copy of each grid value (figure 10b), click ok.

Figure 9: The spatial analyst toolbar contains the functions shown in the above menu.

a) b)

Figure 10: Choose a working directory for files created in spatial analyst/raster calculator to be stored (a) and set the analysis extent as intersection of inputs (b).

Now open the “Raster Calculator” under the spatial analyst toolbar (figure 9). Type newsmallfile = int([oldbigfile]) into the raster calculator (make sure your new file name corresponds to its geographical location, there is one space on each side of the equals sign, and that there are parenthesis and brackets as shown) and click evaluate (figure 11). ArcMap will then build a table and evaluate the solution. Once this process is done a new grid file should appear. The output file should be exactly the same as the input file less many megabytes in size. This can be assured by subtracting the input file from the output file using raster calculator and the following equation: Difference = [oldbigfile] - [newsmallfile]. The difference file will produce a grid from the values produced by subtracting each of corresponding points of the two grids; all points should be zero if everything has been entered correctly. The integer truncated grid files are about 20mb, one-fourth the size of the original SRTM30m files. Because there is no difference between the grid files and since the vertical error in the SRTM 30m data is greater than the 1-meter integer function truncation used to reduce the grid size, we can be confident that reducing the grid size is a valuable task for the interest of data management.

Figure 11: “Raster Calculator” interface with an example for how to reduce grid file size for the SRTM 30m data.

Merging SRTM30m grid files

When working with larger regions covered by the SRTM data you will want to merge grid files. This can be done in raster calculator. Before merging it will be useful to reduce the file size as described above because it will take less time for raster calculator to evaluate the merge equation and you will be able to merge more files. Merging files is limited by your computer system’s memory (if you have 2Gb of memory then you will be able to merge only as many SRTM grids that add up to less than 2Gb).

With two files added to ArcMap open “Options” under the spatial analyst toolbar: under the “General” tab choose a location for the merged output file (figure 10a) and under extent (figure 10b) choose union of inputs since you are merging two files which do not overlap. Now open “Raster Calculator” under the spatial analyst toolbar (figures 9 and 11). Type in the following expression, replacing the hypothetical file names with geographically significant ones and evaluate: fileAC = merge([fileAB] , [fileBC]). The merged files will be continuous because the SRTM data were downloaded using the selection by coordinates option.

Hill shade and color ramp visualization

The visual appeal of the digital elevation models can be greatly improved by applying a stretched color ramp to highlight regions of elevation differences and using the “Hillshade” function to visualize changes in relief. The “Hillshade” function can be found under “Surface Analysis” in the spatial analyst toolbar (figure 9). Enter the desired parameters for the azimuth and altitude and select an output raster file, then click ok (figure 12).

Figure 12: Parameters for creating a Hillshade grid file.

Hillshade files are excellent for viewing drainages and patterns of relief (slopes) over a region (figure 13a), but they do not provide information about the magnitude of elevation differences over those regions. DEMs provide this information. To make a really nice figure where both elevations and the patterns of relief can be seen one must overlay these two maps. Hillshading looks the best if it is done over a DEM in UTM projection. Hillshading does not work well with units of decimal degrees because as you move away from the equator the degrees of latitude and longitude are not equivalent and because the x/y coordinates are much longer than the z units. This results in small differences in relief appearing as vast hill shadowing effects. In order to see the DEM through a Hillshade map (or vise versa) one must make the top layer (the Hillshade) transparent. This can be done by right clicking on the top layer, selecting properties and under properties selecting the display tab. Now make the topmost layer transparent, somewhere between 40 and 70% transparent should work well. Now you would be able to see the information provided in both layers at once if they did not both have the same color scale. To fix this problem change the color ramp of the DEM layer. This option is also found under the layer’s properties, this time in within the symbology tab. Make sure that the values are shown as stretched and then pick a color ramp which displays elevation differences well. It is best to tinker with this until you find a color scheme that brings out the regions of elevation best for you (figure12b). Now both the regions of elevation as well as the patterns of relief are visible (figure 12c).