Page 164 - MATLAB Recipes for Earth Sciences
P. 164
7.5 The Shuttle Radar Topography Mission SRTM 159
project including a gallery of images and a users forum can be accessed on
the NASA web page:
http://www2.jpl.nasa.gov/srtm/
The data were processed at the Jet Propulsion Laboratory. They are being
distributed through the United States Geological Survey¶s (USGS) EROS
Data Center by using the USGS Seamless Data Distribution System.
http://seamless.usgs.gov/
Alternatively, the raw data files can be downloaded via FTP from
ftp://e0mss21u.ecs.nasa.gov/srtm/
This directory contains zipped files of SRTM-3 DEM·s from various areas
of the world, processed by the SRTM global processor and sampled at 3
arc seconds or 90 meters. As an example, we download the 1.7 MB large
fi le s01e036.hgt.zip containing the SRTM data. All elevations are in meters
referenced to the WGS84 EGM96 geoid as documented at
http://earth-info.nga.mil/GandG/wgs84/index.htm
The name of this file refers to the longitude and latitude of the lower-left
(southwest) pixel of the tile, i.e., one degree southern latitude and 36 de-
grees eastern longitude. SRTM-3 data contain 1201 lines and 1201 samples
with similar overlapping rows and columns. After having downloaded and
unzipped the file, we save s01e036.hgt in our working directory. The digital
elevation model is provided as 16-bit signed integer data in a simple binary
raster. Bit order is Motorola (big-endian) standard with the most signifi cant
bit first. The data are imported into the workspace using
fid = fopen('S01E036.hgt','r');
SRTM = fread(fid,[1201,inf],'int16','b');
fclose(fid);
This script opens the fi le s01e036.hgt for read access using fopen, defi nes
the fi le identifi er fid, which is then used for reading the binaries from the
fi le using fread, and writing it into the matrix SRTM. Function fclose
closes the fi le defi ned by fid. Firstly, the matrix needs to be transposed and
fl ipped vertically.
SRTM = SRTM'; SRTM = flipud(SRTM);
The -32768 flag for data voids can be replaced by NaN, which is the MATLAB
representation for Not-a-Number.