I\'m sure this is really simple if you know anything about binary files, but I\'m a newbie on that score.
How would I extract the data from NASA .hgt files? Here is
A tested numpy example:
import os import math import numpy fn = 'DMV/N51E000.hgt' siz = os.path.getsize(fn) dim = int(math.sqrt(siz/2)) assert dim*dim*2 == siz, 'Invalid file size' data = numpy.fromfile(fn, numpy.dtype('>i2'), dim*dim).reshape((dim, dim))