[gdal-dev] Converting USGSDEM into GTOP30 DEM or DTED

İsmail Dönmez ismail at namtrac.org
Sat Mar 14 14:31:36 EDT 2009


Hi,

On Fri, Mar 13, 2009 at 9:18 PM, Even Rouault
<even.rouault at mines-paris.org> wrote:
> Yes, this is possible but you need to adhere strictfully to the DTED
> specification. A DTED tile covers exactly a 1 degree x 1 degree area and the
> corners coordinates must be aligned on integer. As far as I remember, DTED0
> has a 30 second x 30 second resolution below latitude 50°, 60'' x 30''
> between 50 and 70, 90'' x 30'' between 70 and 75, etc (read the spec).
>
> So you will have to produce several DTED files if your input area is over
> several 1° x 1° square. You should use the -prjwin to just select the right
> area for each tile, like :
> gdal_translate -of DTED input.dem n40e2.dt0 -prjwin 41 2 40 3
> gdal_translate -of DTED input.dem n40e3.dt0 -prjwin 41 3 40 4
> etc..
>
> With a little of scripting (Python for examle), you could automate that by
> reading the extent of the source .
>
> You must be sure that your source input has the same resolution as the
> produced DTED, otherwise you'll need to adjust it by specifying the right
> destination size with -outsize 1201 1201 (below 50° latitude).
>
> I see in GDAL source tree that there's a (not compiled) utility that seems to
> do you want. The main file is frmts/dted/dted_test.c, but it relies on the
> other C files of the DTED driver. You would need to fiddle a bit with the
> makefiles and the header to compile it (I see that some necessary symbols
> might not be exported). It is moderately involved provided that you have some
> experience with C.

This is a very nice recipe, thanks!

> But if your third-party app supports 16bit GeoTIFF as a possible source for
> DEM, it would be easier to translate to GeoTIFF.

Wouldn't that lose elevation information?

Regards.

-- 
İsmail DÖNMEZ


More information about the gdal-dev mailing list