N.B. This Tip has been updated for ArcGIS 9.x. Look
here for ArcGIS 8.x.
ArcMap can display
data directly by simply renaming the file extension from .DEM to .BIL.
If access to actual elevation values are needed for analysis, the DEM must be converted to ESRI
grid format. Doing so by the technique below converts original
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
Note that SRTM30 data will require an additional "header file"
that can be downloaded
here, or written using instructions that are detailed in
To convert GTOPO30 data to ESRI grid format do the following:
1) Navigate to the file with Windows Explorer and replace the .dem file extension with .bil
2) Right-click on the .bil file in ArcCatalog, click
"Export" then "Raster to Different Format". Change the default
"Output Raster Dataset" file name (the last part of the path
that is listed) by deleting the .img extension (no extension
here will produce a GRID format file, whereas the default
creates an IMG file) AND give the file a name that is less that
14 characters. If you get a red warning after
completing this step, your file name is likely too long, or the
path to the file includes folders with spaces or forbidden
characters in their names.
Leave the remaining field blank and click OK.
3) Open ArcMap, add the Spatial Analyst toolbar, make sure the
Spatial Analyst Extension is activated, and add the newly
created GRID file;
4) On the ArcGIS Spatial Analyst toolbar, click Spatial Analyst
and select "Options". Set the Working Directory (General
tab; your choice), Analysis Extent ("Same As Layer.."), and Cell
Size ("Same As Layer..")
5) Read on ...
The conversion of the .bil file to GRID format in step 2 above did not convert
the original cell values properly; the original GTOPO30 or
SRTM30 cell values were
"signed", meaning negative values were permissible, whereas the
new GRID values are "unsigned". Negative, 15-bit DEM values (the 16th bit indicates a plus or minus sign) that were part of
the original data were not preserved. An easy (though somewhat
obscure) fix can be accomplished
using the following formula in the Spatial Analyst Raster Calculator to derive a new grid:
CON([in_grid] >= 32768,[in_grid] - 65536,[in_grid])
where [in_grid] is the input grid name.
This statement replaces all raster
values that are greater than or equal to 32768 (i.e. 2E15) with negative numbers that are equal to original value minus
65536 (i.e. 2E16); cell values greater than or equal to 32768 are an artifact of the
original conversion, where the
16th bit was interpreted as an integer rather than a negative sign.
The converted, new out_grid will now have the negative values
properly represented, and the statistics of the grid should match those listed
original GTOPO30 or SRTM30 file. For more on the rationale of this technique, see
details on the use of conditional statements, see the ArcGIS raster calculator Help file.
6) From the Spatial Analyst toolbar dropdown list select
"Raster Calculator" and enter the above expression. The raster calculator is extremely sensitive to syntax; I
recommend you copy and paste the above expression into the calculator and then carefully replace
with the real file name.
7)The negative values in the new grid created by the raster
calculator 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!). These can be converted to NO DATA using the
"Reclassify..." tool in Spatial Analyst or by entering the
following expression into the Raster Calculator:
setnull([Calculation] == -9999, [Calculation])
where [Calculation] is the grid created in step 6 above.
8) This will yield another new grid that exists as a
To make it permanent, right click on the file name in the ArcMap
Table of Contents, select "Data>Make Permanent..." and give
proper file name and folder location.
9) The grid from step 8 has cell 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. project the grid to UTM or another
meter-based projection) or z values need conversion to decimal degrees. To convert
meters to decimal degrees, use the raster calculator to divide by the number of meters per degree (~111,120; or
to mutiply by the inverse, i.e. ~0.0000090):
where [Calculation2] is the
grid created in step 8 above.
This new grid can now 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?).
A final note... if the only goal is to use the grid made in
step 8 to generate slope, aspect or hillshade grids, then an alternative to step 9
is to enter a "z-factor". The z-factor option is available in
the Spatial Analyst tools for creating such grids and is simply the factor
that relates the z-value (elevation in meters in this case) to the x
and y values (decimal degrees in this case). The z factor in
this case is 0.000009.