[OSM-dev] Started coding (Altitude profile)
ludwigbrinckmann at gmail.com
Mon May 26 13:02:49 BST 2008
> If big-endian signed integers ring a bell, I would be quite happy if
> you can take a quick look at this .
Can I point you to the Geospatial Abstraction Data Library (GDAL) (
www.gdal.org), which has solved these problems and comes with a Python
binding and cooperates well with Python's numerical library (
http://numpy.scipy.org/)? There are different ways how to read the files,
but using the gdal_array interface has the big advantage of giving you
instantaneously a two-dimensional array.
Reading in your SRTM file can then be as easy as this:
from osgeo import gdal, gdal_array
srtm = gdal.Open('N19E096.hgt')
data = gdal_array.DatasetReadAsArray(srtm)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dev