[OSM-dev] Started coding (Altitude profile)
sjors at sprovoost.nl
Mon May 26 13:04:42 BST 2008
On Mon, May 26, 2008 at 10:02 PM, Ludwig <ludwigbrinckmann at gmail.com> wrote:
>> 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)
> print data
Thanks for the tip: that sounds a *lot* better indeed!
More information about the dev