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. <br><br>
An alternative solution is OSSIM (<a href="http://www.ossim.org/">http://www.ossim.org/</a>). It has a command-line app called ossim-height. You can use it as follows:<br><br>$ ossim-height 45 10<br>Opened cell: /srtm1/N45E010.hgt<br>
MSL to ellipsoid delta: 39.049<br>Height above MSL: 37<br>Height above ellipsoid: 76.049<br>Geoid value: 39.049<br><br>You can setup a configuration file (see: <a href="http://trac.osgeo.org/ossim/wiki/ossimElevationSetup">http://trac.osgeo.org/ossim/wiki/ossimElevationSetup</a>) that points to your directory of hgt files and OSSIM will figure out which file is needed for your query. <br>
<br>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. <br><br>--Matt<br><br><br>
<div class="gmail_quote">On Fri, Jun 11, 2010 at 9:33 AM, Gianni Olivieri <span dir="ltr"><<a href="mailto:gianni.olivieri@gmail.com">gianni.olivieri@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hallo,<br>
<br>
I need to extract the altitude of a GPS coordinate from a serie of<br>
HGT (SRTM or DEM) (I've download the entire Eurasia...<br>
<br>
So, for example, If I have a directory with all htg file and I'd like<br>
to know the altitude of this coords:<br>
<br>
48°01'35.89" N<br>
8°23'51,86" E<br>
<br>
how can I preceed?<br>
<br>
The elevation in that point is: 761m (google earth result)<br>
I'd like to have a similar results.<br>
<br>
Best regards<br>
<font color="#888888"><br>
<br>
<br>
--<br>
Gianni Olivieri<br>
<a href="mailto:gianni.olivieri@gmail.com">gianni.olivieri@gmail.com</a><br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</font></blockquote></div><br>