Skip to content

Latest commit

 

History

History

readhgt

Import/download NASA SRTM DEM data files (.HGT)

readhgt.m

This function imports .HGT "height" binary data files from NASA SRTM global digital elevation model of Earth land, corresponding to 1x1 degree tiles of 3-arc seconds resolution (SRTM3, around 90 m) and 1-arc second (SRTM1, around 30 m) for USA territory, and returns coordinates vectors latitude and longitude, and a matrix of elevation values.

The function includes an automatic download of data from the USGS SRTM webserver, so indicating latitude and longitude is sufficient to get the data and instant map plot anywhere in the World. Also some basic options as 'merge' to concatenate tiles, 'interp' for gaps (novalue) linear interpolation, 'crop' for rectangle selection inside tile(s).

Examples

  • to plot a map of the Paris region, France (single tile):
readhgt(48,2)

Paris, France (SRTM3) obtained with readhgt(48,2)

  • to plot a map of the Misti volcano area, Peru (SRTM1 cropped and interpolated tile). If the tiles are not already available locally, download needs a valid user/password login at NASA/EarthDATA center):
readhgt([-16.4,-16.2,-71.5,-71.3],'srtm1','login','usr','pwd','interp')

Misti volcano,  (SRTM1) obtained with readhgt([-16.4,-16.2,-71.5,-71.3])

  • to plot a map of Flores volcanic island, Indonesia (5 tiles):
readhgt(-9,119:123) % syntax with lat/lon tile integers
% or
readhgt([-9,-8,119,124]) % syntax with lat/lon box limits
  • to download SRTM1 data of Cascade Range (27 individual tiles):
X=readhgt(40:48,-123:-121,'tiles');

Around Seattle, USA (SRTM1) obtained with readhgt(46:47,-123:-122)

East African Rift volcanoes, Tanzania  (SRTM3) obtained with readhgt(-4:-3,35:36)

Author

François Beauducel, IPGP, beaudu, [email protected]

Documentation

Type 'doc readhgt' for syntax, help and examples. The function needs the file "readhgt_srtm_index.txt" and get better mapping results with author's dem.m function.