dted

Read U.S. Department of Defense Digital Terrain Elevation Data (DTED)

Syntax

[Z, refvec] = dted
[Z, refvec] = dted(filename)
[Z, refvec] = dted(filename, samplefactor)
[Z, refvec] = dted(filename, samplefactor, latlim, lonlim)
[Z, refvec] = dted(dirname, samplefactor, latlim, lonlim)
[Z, refvec, UHL, DSI, ACC] = dted(...)

[Z, refvec] = dted returns all of the elevation data in a DTED file as a regular data grid, Z, with elevations in meters. The file is selected interactively. This function reads the DTED elevation files, which generally have filenames ending in .dtN, where N is 0,1,2,3,... refvec is the associated three-element referencing vector that geolocates Z.

[Z, refvec] = dted(filename) returns all of the elevation data in the specified DTED file. The file must be found on the MATLAB® path. If not found, the file may be selected interactively.

[Z, refvec] = dted(filename, samplefactor) subsamples data from the specified DTED file. samplefactor is a scalar integer. When samplefactor is 1 (the default), DTED reads the data at its full resolution. When samplefactor is an integer n greater than one, every nth point is read.

[Z, refvec] = dted(filename, samplefactor, latlim, lonlim) reads the data for the part of the DTED file within the latitude and longitude limits. The limits must be two-element vectors in units of degrees.

[Z, refvec] = dted(dirname, samplefactor, latlim, lonlim) reads and concatenates data from multiple files within a DTED CD-ROM or directory structure. The dirname input is a string with the name of a directory containing the DTED directory. Within the DTED directory are subdirectories for each degree of longitude, each of which contain files for each degree of latitude. For DTED CD-ROMs, dirname is the device name of the CD-ROM drive.

[Z, refvec, UHL, DSI, ACC] = dted(...) returns structures containing the DTED User Header Label (UHL), Data Set Identification (DSI) and ACCuracy metadata records.

Background

The U. S. Department of Defense, through the National Geospatial Intelligence Agency, produces several kinds of digital cartographic data. One is digital elevation data, in a series called DTED, for Defense Digital Terrain Elevation Data. The data is available as 1-by-1 degree quadrangles at horizontal resolutions ranging from about 1 kilometer to 1 meter. The lowest resolution data is available to the public. Certain higher resolution data is restricted to the U.S. Department of Defense and its contractors.

DTED Level 0 files have 121-by-121 points. DTED Level 1 files have 1201-by-1201. The edges of adjacent tiles have redundant records. Maps extend a half a cell outside the requested map limits. The 1 kilometer data and some higher-resolution data is available online, as are product specifications and documentation. DTED files are binary. No line ending conversion or byte-swapping is required when downloading a DTED file.

Remarks

Latitude-Dependent Sampling

In DTED files north of 50° North and south of 50° South, where the meridians have converged significantly relative to the equator, the longitude sampling interval is reduced to half of the latitude sampling interval. In order to retain square output cells, this function reduces the latitude sampling to match the longitude sampling. For example, it will return a 121-by-121 elevation grid for a DTED file covering from 49 to 50 degrees north, but a 61-by-61 grid for a file covering from 50 to 51 degrees north. When you supply a directory name instead of a file name, and latlim spans either 50° North or 50° South, an error results.

Snapping Latitude and Longitude Limits

If you call dted specifying arbitrary latitude-longitude limits for a region of interest, the grid and referencing vector returned will not exactly honor the limits you specified unless they fall precisely on grid cell boundaries. Because grid cells are discrete and cannot be arbitrarily divided, the data grid returned will include all areas between your latitude-longitude limits and the next row or column of cells, potentially in all four directions.

Data Sources and Information

DTED files contain digitial elevation maps covering 1-by-1-degree quadrangles at horizontal resolutions ranging from about 1 kilometer to 1 meter. For details on locating DTED for download over the Internet, see the following documentation at the MathWorks Web site:

http://www.mathworks.com/support/tech-notes/2100/2101.html .

Null Data Values

Some DTED Level 1 and higher data tiles contain null data cells, coded with value -32767. When encountered, these null data values are converted to NaN.

Nonconforming Data Encoding

DTED files from some sources may depart from the specification by using two's complement encoding for binary elevation files instead of "sign-bit" encoding. This difference affects the decoding of negative values, and incorrect decoding usually leads to nonsensical elevations.

Thus, if the DTED function determines that all the (nonnull) negative values in a file would otherwise be less than -12,000 meters, it issues a warning and assumes two's complement encoding.

Examples

[Z,refvec] = dted('n38.dt0');
[Z,refvec,UHL,DSI,ACC] = dted('n38.dt0',1,[38.5 38.8],...
		[-76.8 -76.6]);
[Z,refvec,UHL,DSI,ACC] = dted('f:',1,[38.5 38.8],...
		[-76.8 -76.6]);

See Also

usgsdem, gtopo30, tbase, etopo

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS