[gdal-dev] Interpretation of DTED elevation data

AlexRNL alex.barfety at signalis.com
Wed Mar 28 04:17:37 EDT 2012


Hi everyone!


I have been trying to extract elevation data from a DTED file using GDAL (in
Java). The file being loaded is of level 0 precision and seems to be correct
as an import into Global Mapper is rendering the expected result.


I managed to retrieve the image data but I don't know to transform those
values into a altitude in meters.


According to the DTED format specification, the elevation values are
supposed to be two-bytes integer in meters. But, when using the 
http://www.gdal.org/java/org/gdal/gdal/Band.html#ReadRaster_Direct(int, int,
int, int, int, int, int, java.nio.ByteBuffer) ReadRaster_Direct method, the
buffer retrieved is supposed to be composed of Int16 number but when i'm
converting the raw data (bytes) into a short array i'm getting all sorts of
value which doesn't make a lot of sense. The range of the elevation is
spanning from 1 to 65286!


Is there a conversion that i'm missing? How do I get the meter value from
the raster returned by GDAL?


I've been searching for a while but it doesn't seem like anyone has that
kind of problem...


Thanks in advance for any information that may help me :)

Alex.

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/gdal-dev-Interpretation-of-DTED-elevation-data-tp4663511p4663511.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120328/d2d4accc/attachment.html


More information about the gdal-dev mailing list