Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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(foldername, samplefactor, latlim, lonlim)
[Z, refvec, UHL, DSI, ACC] = dted(...)

Description

[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(foldername, samplefactor, latlim, lonlim) reads and concatenates data from multiple files within a DTED CD-ROM or folder structure. The foldername input is a character vector with the name of a folder containing the DTED folder. Within the DTED folder are subfolders for each degree of longitude, each of which contain files for each degree of latitude. For DTED CD-ROMs, foldername 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.

Examples

collapse all

This example shows how to read Digital Terrain Elevation Data (DTED). To run this example, you must have a DTED file. For details on locating DTED for download over the Internet, see Finding Geospatial Data.

Read the DTED file.

[Z,refvec] = dted('n38.dt0');

This example shows how to read Digital Terrain Elevation Data (DTED), specifying the sample factor and latitude and longitude. To run this example, you must have a DTED file. For details on locating DTED for download over the Internet, see Finding Geospatial Data.

Read the DTED file, specifying sample factor along with latitude and longitude. The example returns structures containing the DTED User Header Label (UHL), Data Set Identification (DSI) and Accuracy metadata records.

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

This example shows how to read Digital Terrain Elevation Data (DTED) specifying a folder name. To run this example, you must have DTED files. For details on locating DTED for download over the Internet, see Finding Geospatial Data.

Read the DTED files in the folder specified. The example returns structures containing the DTED User Header Label (UHL), Data Set Identification (DSI) and Accuracy metadata records.

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

Tips

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 folder 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 digital 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 Finding Geospatial Data.

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.

See Also

| | |

Introduced before R2006a

Was this topic helpful?