[gdal-dev] DTED Level 1 to Level 0

Frank Warmerdam warmerdam at pobox.com
Mon Jun 22 09:46:59 EDT 2009


Aaron Brown wrote:
> Hi Frank,
> 
> Thanks for the fast reply and also attaching a subject line, i forgot 
> all about that... :S
> 
> I had read that link before and i understand the basic differences 
> between DTED levels 0 and 1 however I'm truely stuck at where to start.  
> The task was given to me by a co-worker when I was telling him about my 
> interest in learning to program when I stumbled across gdal.  I have 
> read various documentation on gdal but still don't fully understand how 
> to use it.  Would you be able to point me towards some useful examples?
> 
> I'm not sure how to specify which DTED level you wish to write, however 
> I /did/ try "gdal_translate -of DTED DTED/E150/S22.DT1 
> DTED/E150/S22.DT0" however i'm fairly certain the output was really DTED 
> Level 1.
> 
> Any help is appreciated.

Aaron,

I see in the DTED docs: "The DTED driver does support creating new files,
but the input data must be exactly formatted as a Level 0, 1 or 2 cell. That
is the size, and bounds must be appropriate for a cell."

DTED 0 is 121x121 pixels with an origin and pixel size similar to:

Origin = (-80.004166666666663,44.004166666666663)
Pixel Size = (0.008333333333333,-0.008333333333333)


So you need to transform the level 1 file to something like this.  On a
different dt1 file I tried a command like:

   gdal_translate -outsize 121 121 in.dt1 -of DTED out.dt0

This produced an output DTED 0 file that appeared to have the correct
bounds though the following warning was issued:

Warning 1: The corner coordinates of the source are not properly aligned on 
plain latitude/longitude boundaries.

which I believe is because there was a slight offset in the origin.

So, with luck you can use gdal_translate to produce DTED Level 0
files.  I will warn that this solution has not been tested for
compliance with military standards and some file metadata may be
wrong. But it should be good enough for many purposes.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list