Reading some things about the SRTM datasets, I thought at using numpy to open and parse them efficiently.
The hgt data format is well defined here http://www2.jpl.nasa.gov/srtm/faq.html.
Files can read directly from numpy like this :
import numpy # reading an <span style="font-family:Arial;">International 3-arc-second file</span> srtm_dtype = numpy.dtype([('data', numpy.uint16, 1201)]) image = numpy.fromfile('N00E072.hgt', dtype=srtm_dtype)
If the file were bigger, you could also use memmaps to allow the loading of huge files without sufficient memory :
image = numpy.memmap('N00E072.hgt', dtype=numpy.uint16, mode="r+", shape=(1201,1201))
And here it is … you can easily adapt that to United States 1-arc-second files by updating the shape of the dtype.