The USGS DEM
standard is a geospatial
Geospatial analysis is an approach to applying statistical analysis and other informational techniques to geographically based data. Such analysis employs spatial software and analytical methods with terrestrial or geographic datasets, including geographic information systems and...
A file format is a particular way that information is encoded for storage in a computer file.Since a disk drive, or indeed any computer storage, can store only bits, the computer must have some way of converting information to 0s and 1s and vice-versa. There are different kinds of formats for...
developed by the United States Geological Survey
The United States Geological Survey is a scientific agency of the United States government. The scientists of the USGS study the landscape of the United States, its natural resources, and the natural hazards that threaten it. The organization has four major science disciplines, concerning biology,...
for storing a raster
In computer graphics, a raster graphics image, or bitmap, is a data structure representing a generally rectangular grid of pixels, or points of color, viewable via a monitor, paper, or other display medium...
-based digital elevation model
A digital elevation model is a digital model or 3-D representation of a terrain's surface — commonly for a planet , moon, or asteroid — created from terrain elevation data....
. It is an open standard
An open standard is a standard that is publicly available and has various rights to use associated with it, and may also have various properties of how it was designed . There is no single definition and interpretations vary with usage....
, and is used throughout the world. It has been superseded by the USGS's own SDTS format but the format remains popular due to large numbers of legacy files, self-containment, relatively simple field structure and broad, mature software support.
A USGS DEM can be classified into one of four levels of quality. This is due to the multiple methods of data collection, and certainty in the data.
A minute of arc, arcminute, or minute of angle , is a unit of angular measurement equal to one sixtieth of one degree. In turn, a second of arc or arcsecond is one sixtieth of one minute of arc....
|Created by autocorrelation
Autocorrelation is the cross-correlation of a signal with itself. Informally, it is the similarity between observations as a function of the time separation between them...
or manual profiling from aerial photographs
|May be derived from a wide variety of sources using any of a number of USGS approved techniques and instrumentation
||Created from digital line graph
A Digital Line Graph is a cartographic map feature represented in digital vector form that is distributed by the U.S. Geological Survey . DLGs are collected from USGS maps and are distributed in large-, intermediate- and small-scale with up to nine different categories of features, depending on...
(DLG) contours or equivalent, from any USGS map series up to 1:100000 scale
|The accuracy and data spacing are intended to support computer applications that analyze hypsographic features to a level of detail similar to manual interpolations of information from printed source maps
||Created from DLG that have vertically integrated with all categories of hypsography, hydrography, ridge line, break line, drain files, and all vertical and horizontal control network
||Requires a system of logic to interpret the data
||Created from electronic (non-photogrammetric
Photogrammetry is the practice of determining the geometric properties of objects from photographic images. Photogrammetry is as old as modern photography and can be dated to the mid-nineteenth century....
) imaging sensor systems, either active (e.g., radar or lasar) or passive (received radiant energy)
|The process includes all additional post-processing required to bring the DEM grid to its final form
The USGS DEM format is a self-contained (single file) set of ASCII-encoded (text) 1024-byte blocks that fall into three record categories called A, B, and C. There is no cross-platform ambiguity since line ending control codes are not used, and all data including numbers is represented in readable text form. There is no known binary analogue of the format, although it is common practice to compress the files with gzip
Gzip is any of several software applications used for file compression and decompression. The term usually refers to the GNU Project's implementation, "gzip" standing for GNU zip. It is based on the DEFLATE algorithm, which is a combination of Lempel-Ziv and Huffman coding...
Floating-point numbers are encoded using Fortran
Fortran is a general-purpose, procedural, imperative programming language that is especially suited to numeric computation and scientific computing...
scientific notation, so C
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...
programs need to swap the "D" exponent-indicating character with "E" when parsing (and vice versa when writing).
The A record appears once as the file's header, the C record also appears once as the trailer, and multiple B records (called profiles
) comprise the elevation data. A and C records each fit within one block but a single B record typically requires multiple blocks. When such block-spanning occurs, data is shifted to start cleanly on each block boundary. A records also come in "old" and "new" flavors, because the USGS added several fields to the A record.
The fields in the A record hold the origin, type, summary statistics and the measurement systems used by the profiles. One of the key items is the quadrangle
In geology or geography, the word "quadrangle" usually refers to a United States Geological Survey 7.5-minute quadrangle map, which are usually named after a local physiographic feature. The shorthand "quad" is also used, especially with the name of the map; for example, "the Ranger Creek, Texas...
, which is a set of four terrestrial coordinates describing the four-sided polygon enclosing the area of interest.
B records (profiles) are a variable-length longitudinal column of raster elevations that start at a specified location. They are some multiple of 1024 bytes long and contain a small header summarizing the profile. The elevations are contiguous; breaks or other discontinuities are expressed using "void" elevations of value -32767. Each elevation is described as a six-character readable integer occupying a fixed location in a block. The profile header only appears in the first block, so subsequent blocks hold more elevation values. When reading the DEM file from first byte to last, one reads the profiles as columns from west to east. The elevations within a profile run from south to north.
The variable-location and variable-length nature of profiles stems mainly from the use of the UTM (Universal Transverse Mercator) ground reference system. Since measurements within UTM employ fixed distances (e.g., 30 meters between elevation samples), the quadrangle must slightly distort to map such locations onto the spherical Earth. This distortion usually manifests as a rotated square, hence the elevation columns near the east and west edges start more northward and contain fewer samples.
The C record contains root-mean squared error (RMSE) quality control data, using ten six-character integer fields.
A Record Layout:Incomplete – please contribute
| Starting Col
|| Ending Col
|| Descriptive Name of the represented area
|| UTM Zone number
|| Unit of resolution of ground grid (0=radian;1=feet;2=metre;3=arc-second)
|| Unit of resolution Elevation (1=feet;2=metre)
|| Easting of the South West corner
|| Northing of the South West corner
|| Easting of the North West corner
|| Northing of the North West corner
|| Easting of the North East corner
|| Northing of the North East corner
|| Easting of the South East corner
|| Northing of the South East corner
|| Minimum elevation found in this file
|| Maximum elevation found in this file
|| Resolution per grid cell East – West
|| Resolution per grid cell North – South
|| Number of columns
- Standards for digital elevation models, U.S. Department of the Interior, U.S. Geological Survey, National Mapping Division: