USGSDEM (.dem)

USGS ASCII DEM files.
Standard format for the distribution of terrain elevation data for the United States.
United States Geological Survey (USGS) standard.
DEM is an acronym for Digital Elevation Model.
ASCII format.
Typically distributed as .zip or .gz compressed file.
The .dem file extension is often omitted.
Common variants are 1-degree and 7.5-minute-degree DEMs.
1-degree DEMs cover 1×1-degree blocks at a 3-arc-second grid spacing and 1201×1201 raster size.
The 1-degree USGS DEM format is occasionally referred to as 1:250,000 scale DEM.
7.5-minute DEMs cover 7.5×7.5-minute blocks at a 30-meter grid spacing and correspond to the USGS 1:24,000 and 1:25,000 scale topographic quadrangle map series.
The raster coordinates used for 7.5-minute DEM files are referenced in the Universal Transverse Mercator (UTM) projection, resulting in irregular raster dimensions.
Elevations are given in meters relative to the National Geodetic Vertical Datum of 1929 (NGVD) for the continental United States and relative to the local mean sea level in Hawaii.
  • Import supports 1-degree and 7.5-minute USGS ASCII DEM files.

Import and ExportImport and Export

  • Import["file.dem"] imports a USGS ASCII DEM file and renders it as a topographic map.
  • Import["file.dem"] renders a DEM file using ReliefPlot.
  • Import["file.dem",elem] imports the specified element from a USGS ASCII DEM.
  • Import["file.dem",{elem,suba,subb,}] imports a subelement.
  • Import["file.dem",{{elem1,elem2,}}] imports multiple elements.
  • The import format can be specified with Import["file","USGSDEM"] or Import["file",{"USGSDEM",elem,}].
  • See the reference pages for full general information on Import.
  • ImportString supports the DEM format.

ElementsElements

  • General Import elements:
  • "Elements"list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties, and settings
  • Import elements:
  • "Data"array of terrain elevation values
    "Graphics"DEM file rendered as ReliefPlot
    "Image"raw DEM data as an image object
    "ReliefImage"DEM file rendered as ReliefImage
  • Import by default uses for the DEM format.
  • Metadata elements:
  • "Dimensions"size of the elevation data array
    "ElevationRange"range of elevation coordinates, given in meters
    "ElevationResolution"resolution of elevation values, given in meters
    "SpatialRange"range of geographic coordinates, given in decimal degrees
    "SpatialResolution"grid spacing in arc seconds
  • Import["file.dem","ElevationRange"] gives the range of elevation values in units of meters.
  • Import["file.dem","SpatialRange"] gives the bounding coordinates of the geographic region covered by the file as an expression of the form .
  • Elements representing the geodetic datum and reference ellipsoid used in the file:
  • "CoordinateSystem"name of the coordinate system used in the file
    "Datum"geodetic datum
    "SemimajorAxis"semimajor axis of the reference ellipsoid in meters
    "SemiminorAxis"semiminor axis of the reference ellipsoid in meters
    "InverseFlattening"inverse flattening of the ellipsoid
    "LinearUnits"coordinate system units
  • Elements specifying the cartographic projection and its parameters:
  • "Projection"projection name and parameters
    "Centering"latitude and longitude defining the origin of the projection
    "StandardParallels"standard parallels
    "CentralScaleFactor"scale factor at the central meridian or center of projection
    "GridOrigin"grid coordinates of the central parallel and meridian
    "ProjectionName"Wolfram Language standard name of the projection used
    "ReferenceModel"what reference sphere or ellipsoid to use
  • Accessing low-level meta-information from the file:
  • "CoordinateSystemInformation"raw parameters of the coordinate system as stored in the file
  • See the reference page for GeoProjectionData for full information on cartographic projections.

OptionsOptions

  • General rendering options:
  • BoxRatiosAutomaticeffective 3D bounding box ratios
    ColorFunctionhow to determine the color of surfaces
    DataRangeAutomaticthe range of latitude and longitude values to assume for the data
    DataReversedFalsewhether to reverse the order of rows
    ImageSizeAutomaticthe overall size of the image
    LightingAngleAutomaticthe effective angle from which simulated illumination is taken to come
  • Advanced option:
  • "DownsamplingFactor"1integer factor by which the number of latitudinal and longitudinal data points is reduced when importing

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Import a USGS DEM file and render it as a relief plot:

In[1]:=
Click for copyable input
Out[1]=

Show the list of import elements available in this file:

In[2]:=
Click for copyable input
Out[2]=

Name of the geodetic datum used in the file:

In[3]:=
Click for copyable input
Out[3]=

Import information about the cartographic projection:

In[4]:=
Click for copyable input
Out[4]=

Get the range of geographic coordinates from this file:

In[5]:=
Click for copyable input
Out[5]=

Import the range of elevation data in meters:

In[6]:=
Click for copyable input
Out[6]=
Introduced in 2007
(6.0)
| Updated in 2010
(8.0)