Fall 2003
   GEO327G/386G: GIS & GPS Applications in Earth Sciences


Software Tips - 9

Messages

Syllabus

Schedule

Lecture

Lab

Projects

Trip(s)


 
   
  Messages>Labs>Tips>Tip 9    
9. 

How to import GTOPO30 or SRTM30 data into ArcMap for ArcGIS 8.x ONLY

   
 

 

ARCINFO or ArcView can display GTOPO30 or SRTM30 elevation data directly by simply renaming the file extension from .DEM to .BIL. If access to the actual elevation values are needed for analysis in ARCINFO or ARCGIS, the DEM must be converted to ESRI grid format with the IMAGE to GRID tool in ArcToolbox. Doing so converts cell values from signed 16 bit binary format to ASCII values, which are elevations in meters. Details of the GTOPO30 and SRTM30 data format are available at ftp://edcftp.cr.usgs.gov/pub/data/gtopo30/global/README.TXT and ftp://edcsgs9.cr.usgs.gov/pub/data/srtm/Documentation/SRTM_Topo.txt.

To convert these data to ESRI grid format do the following:

1) replace the .dem file extension with .bil

2) create a folder to store the new grid

3) open ArcToolbox, navigate to Conversion Tools>Import_to_Raster>Image_to_Grid

4) run Image_to_Grid, filling in the blanks by browsing to the .bil file, choosing "all" for band, either bilinear or cubic conv. for the resampling technique, optimized for use with Grid, and by browsing to the output folder you earlier created. The output file name must be less than 9 characters, with no spaces. You may also have trouble if any folder name(s) in the path to the file contain spaces or are more than 8 characters(I haven't tested this yet).

5) Read on ......

ArcToolbox IMAGE to GRID conversion does not support conversion of signed image data, so negative, 15-bit DEM values (the 16th bit indicates a plus or minus sign) that were part of the original GTOPO or SRTM30 data are not preserved. After running IMAGE to GRID, an easy fix can be accomplished using the following formula in the Spatial Analyst raster calculator to derive a new grid:

out_grid = con([in_grid] >= 32768, [in_grid] - 65536, [in_grid])

Where out_grid is a new output grid name (no spaces, 8 characters or less!) and in_grid is the input grid name (with the same rules). This statement replaces all raster values that are greater than or equal to 32768 (2E15) with negative numbers that are equal to original value minus 65536 (2E16); cell values greater than 32768 are an artifact of the image to grid conversion that interprets the 16th bit as an integer rather than a sign.

The converted, new out_grid will then have the negative values properly represented, and the statistics of the grid should match those listed in the .STX file. For more on the rationale of this technique, see http://www.esri.com/news/arcuser/0700/files/gtopo30.pdf. For details on how to use a "con statement" with the raster calculator, see the ArcGIS raster calculator Help file.

The raster calculator is extremely sensative to syntax; I recommend you copy and paste the above expression into the calculator and then carefully replace the "in_grid" with the real file name.

Finally, the negative values in the new out_grid include "dummy values" of -9999 for areas of ocean. These comprise a "mask" (see the spatial analyst literature) but should properly be set to NO DATA (in any elevation analysis these large negative elevations values would be problematic!). Do so using the reclassify function in Spatial Analyst, setting the -9999 values to "no data". This will yield another new grid that exists as a temporary dataset (unless you specified differently during the reclassification) within ArcMap. To make it permanent, right click on the file name in the legend and "make permanent".

Your final grid has cell z values that are elevations in meters, but with x and y coordinates in decimal degrees. Hillshade, slope and aspect calculations in Spatial Analyst are only meaningful if horizontal and vertical units are the same. Thus, either the x, y coordinates need to be converted to meters (e.g. reproject the grid to UTM) or z values need conversion to decimal degrees. To convert z values to decimal degrees, use the raster calculator to divide by the number of meters per degree (~111,120; or mutiply by the inverse, i.e. ~0.0000090):

degree_grid = [reclass_of_out_grid]*0.0000090

Where degree_grid is a new grid with cell elevation values in decimal degrees and [reclass of out_grid] is the earlier derived grid with cell values in meters. The degree_grid can then be used to calculate slope, aspect, hillshade, etc. grids with Spatial Analyst. Be sure to retain the grid with elevations in meters for other uses (who understands elevations in decimal degrees?).

An alternative to this making a new grid with z values in decimal degrees is to enter a "z-factor" when creating a hillshade or aspect grid.  The z-factor option is available in the GUI during the process of creating such grids and is simply the factor that relates the z-value (elevation units in this case) to the x and y values (decimal degrees in this case).

Finally, before these data will properly overlay other data in ArcMap, the grid file needs to have a spatial reference.  Assign one by right-clicking on the grid file in ArcCatalog, select "Properties", and give the appropriate Spatial Reference (Geographic Coordinate System, WGS84).

 

   

 Last updated October 15, 2019
 Comments and questions to helper@mail.utexas.edu
 Geological Sciences, U. Texas at Austin