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. But if your third-party app supports 16bit GeoTIFF as a possible source for DEM, it would be easier to translate to GeoTIFF. Also by reading the documentation of the EHdr driver, I see GDAL can read GTOPO30 through the EHdr driver. So it could be possible to take the output of the EHdr driver as a GTOPO30 data (no guarantee ...), but we only output one kind of EHdr data which is maybe not the layout of GTOPO30. You would need checking the GTOPO30 spec too. Even Le Friday 13 March 2009 12:38:20 İsmail Dönmez, vous avez écrit : > Hi all; > > I have a rather big (3.1G) USGSDEM file. I need to convert it to > GTOP30 DEM format or to a series of DTED files to be read by a 3rd > party library which does not support USGSDEM files. I looked around > and apparently gdal does not support exporting to GTOP30 DEM format. > So I wonder if there is a way to convert USGSDEM file into a DTED file > which will cover _all_ area, ie. > > gdal_translate -of DTED input.dem out.dt0 > > just creates a one point with 1201x1201 area. > > Any help is appreciated. Regards. _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev