Note that this page is meant to complement the global DEM coverage webpage on this website, see that page first.
DEM data like SRTM and Gtopo30 is delivered in Band-Interleaved by Line (BIL) format. Many software packages can read BIL format and can georeference it correctly if a header file (.HDR) is available with the file.
Below are instructions for manually creating a header file for SRTM DEM data.
Note, the free program 3DEM v169 can export SRTM (.hgt) and save them as georeferenced GeoTIFF DEM files, avoiding this step. However, currently 3DEM cannot batch-process files.
Converting them manually in Windows is described below. The contents will be in .HGT format. GIS software like ArcGIS can import .HGT files if they are renamed to be .BIL files and a header file is created.
1. Unzip the .ZIP or .GZ files using Winzip. With GTOPO30 data it is important to make sure "TAR file Smart Conversion" in Winzip is unchecked under
Options -> Configuration -> Misc
2. Gtopo30 data usually has a HDR file. SRTM data does not. With SRTM rename the .HGT file to .BIL.
Create a .hdr file for the file using a text editor like Notepad. Examples follow.
Example for N18W077.bil should be named N18W077.hdr
BYTEORDER M
LAYOUT BIL
NROWS 1201
NCOLS 1201
NBANDS 1
NBITS 16
BANDROWBYTES 2402
TOTALROWBYTES 2402
BANDGAPBYTES 0
NODATA -32768
ULXMAP -76.9995833333 <- WYYY - 0.0004166667
ULYMAP 19.00041666666667 <- NXX + 1.0004166667
XDIM 0.000833333333333
YDIM 0.000833333333333
(Note: don't include the <- XXXXXX part!)
In ArcCatalog browse this directory. You should see the .BIL file. You must convert this file to GRID to use it for analysis. In ArcCatalog browser right- click on the filename and go down to Export to a Different Format... , this is the way to Export to GRID.
INITIAL PROCESSING
Some initial processing is required to prepare the data for use. First, it must be projected. Next, if you're on a computer with an Intel CPU (most PCs) you need to reverse the Byte-order, finally, if you set the values under -9999 to NULL then the empty cells will have NODATA values.
Projection / Coordinate System in ArcGIS:
- ArcCatalog or ArcToolbox can be used to Define Projections for GRID files. To use ArcCatalog, right-click to get the Properties for a GRID file. Next click the "Spatial Reference tab", and click "Edit..." to redefine the projection/coordinate system.
- The VBA MacroBatchRasterSpatialRef will automate this process in ArcCatalog. Also, the subsequent steps can be automated for large number of tiles by using Excel to create an AML script as shown in this sample Excel file, and explained on this webpage.
- Three dialog boxes follow, select the following:
Projection: GEOGRAPHIC
Geographic Units: DD (decimal degrees)
Datum: WGS84
No offset
- Open the GRID in ArcMap with Spatial Analyst extension turned on.
- If you're on an Intel computer you must reverse the Byte order, Macs and UNIX workstations on Motorola CPU machines don't have to do this step. In Spatial Analyst Raster Calculator apply the following GRID command, substituting your file name for 'in_grid':
out_grid = con ( [in_grid] >= 32768 , [in_grid] - 65536 , [in_grid])
- Finally, in Raster calculator apply this command.
setnull ( [out_grid] < -9998 , [out_grid] )
- Save the resulting "CALC" raster to a real GRID file with the "Make Permanent..." command.
More information is available on converting these files in Workstation GRID using IMAGEGRID and a related AML script.
This page is meant to complement the global DEM coverage webpage on this website.