[gdal-dev] SRTM maps and altitude...

Massimo Di Stefano massimodisasha at gmail.com
Mon Jun 14 07:02:01 EDT 2010


If you need only the core library 
(it includes the ossim-height executable)
you will find ossim packaged for debian unstable (SID) [1]
or the complete set of apps for ubuntu 9.04 [2]

[1] http://wiki.debian.org/DebianGis/PackageList
[2] https://launchpad.net/~ubuntugis

btw using gdal you can read the dataset as an array and use the geotransform
to know pixel position and the correspondent pixel(array) value.

in pyton using the gdal bindings,  to start :

indataset = gdal.Open(str(infile), gdal.GA_ReadOnly)
band = indataset.GetRasterBand(1)
gdarray = indataset.GetRasterBand(1).ReadAsArray()
geotransform = indataset.GetGeoTransform() 



Il giorno 14/giu/2010, alle ore 10.33, Gianni Olivieri ha scritto:

> 2010/6/11 Gianni Olivieri <gianni.olivieri at gmail.com>:
>> 2010/6/11 Matt Klaric <matt at klaric.com>:
>>> While you certainly can accomplish this using GDAL, you'll need to first
>>> figure out which hgt file to open, then translate the geographic coordinate
>>> to the image coordinate to know what pixel value to lookup.
>>> 
>>> An alternative solution is OSSIM (http://www.ossim.org/).  It has a
>>> command-line app called ossim-height.  You can use it as follows:
> 
> thanks... I've looked to ossim... but there is a versione for linux?
> or only form mac and windows?
> 
>>> 
>>> $ ossim-height 45 10
>>> Opened cell:  /srtm1/N45E010.hgt
>>> MSL to ellipsoid delta:   39.049
>>> Height above MSL:        37
>>> Height above ellipsoid:  76.049
>>> Geoid value:  39.049
>> 
>> thanks for this link, I didn't know this software.
>> 
>> I try this.
>> 
>> Thanks...
>> 
>>> 
>>> You can setup a configuration file (see:
>>> http://trac.osgeo.org/ossim/wiki/ossimElevationSetup) that points to your
>>> directory of hgt files and OSSIM will figure out which file is needed for
>>> your query.
>>> 
>>> If you're needing to embed this in an application of yours, you can use the
>>> OSSIM API to accomplish the same thing.  Check out the source for
>>> ossim-height for an example of how to do this.
>>> 
>>> --Matt
>>> 
>>> 
>>> On Fri, Jun 11, 2010 at 9:33 AM, Gianni Olivieri <gianni.olivieri at gmail.com>
>>> wrote:
>>>> 
>>>> Hallo,
>>>> 
>>>>    I need to extract the altitude of a GPS coordinate from a serie of
>>>> HGT (SRTM or DEM) (I've download the entire Eurasia...
>>>> 
>>>> So, for example, If I have a directory with all htg file and I'd like
>>>> to know the altitude of this coords:
>>>> 
>>>> 48°01'35.89" N
>>>> 8°23'51,86" E
>>>> 
>>>> how can I preceed?
>>>> 
>>>> The elevation in that point is: 761m (google earth result)
>>>> I'd like to have a similar results.
>>>> 
>>>> Best regards
>>>> 
>>>> 
>>>> 
>>>> --
>>>> Gianni Olivieri
>>>> gianni.olivieri at gmail.com
>>>> _______________________________________________
>>>> gdal-dev mailing list
>>>> gdal-dev at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>> 
>>> 
>> 
>> 
>> 
>> --
>> Gianni Olivieri
>> gianni.olivieri at gmail.com
>> 
> 
> 
> 
> -- 
> Gianni Olivieri
> gianni.olivieri at gmail.com
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev



More information about the gdal-dev mailing list