Background & Context

    • GTOPO30 global topographic data.
    • United States Geological Survey (USGS) standard.
    • Distribution format for a global digital elevation model (DEM) with 30-arc-second grid spacing.
    • Binary format.
    • Typically distributed as a compressed archive of multiple files.
    • Uses a horizontal grid spacing of 30 arc seconds (1/120 degrees) or approximately 1 kilometer.
    • Developed 19931996 by the USGS Center for Earth Resources Observation and Science.


  • Import["dir/"] imports a GTOPO30 directory and renders it as a topographic map.
  • Import["file.tar.gz"] imports from a GTOPO30 archive file.
  • Import["dir/"] renders GTOPO30 data using ReliefPlot.
  • Import["dir/",elem] imports the specified element from GTOPO30 data.
  • Import["dir/",{elem,suba,subb,}] imports a subelement.
  • Import["dir/",{{elem1,elem2,}}] imports multiple elements.
  • The import format can be specified with Import["file","GTOPO30"] or Import["file",{"GTOPO30",elem,}].
  • When importing GTOPO30 topographic data, the Wolfram Language reads information from multiple files contained in the GTOPO30 directory or archive file.
  • See the following reference pages for full general information:
  • Importimport from a file
    CloudImportimport from a cloud object
    ImportStringimport from a string
    ImportByteArrayimport from a byte array

Import Elements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Summary"summary of the file
    "Rules"list of rules for all available elements
  • 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 "Graphics" for the GTOPO30 format.
  • Metadata elements:
  • "DataFormat"data type used in the file for storing elevation values
    "Dimensions"size of the elevation data array
    "ElevationRange"range of elevation coordinates, given in meters
    "SpatialRange"range of geographic coordinates, given in decimal degrees
    "SpatialResolution"grid spacing in arc seconds
  • Import["file.tar.gz","ElevationRange"] gives the range {zmin,zmax} of elevation values in meters.
  • Import["file.tar.gz","SpatialRange"] gives the bounding coordinates of the geographic region covered by the file as an expression of the form {{latmin,latmax},{longmin,longmax}}.


  • General Import options:
  • BoxRatiosAutomaticeffective 3D bounding box ratios
    ColorFunction"Cartographic"how to determine the color of surfaces
    ColorFunctionScalingFalsewhether to normalize the elevation values supplied to the color function
    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 options:
  • "DefaultElevation"0elevation value taken for sea-level data points
    "DownsamplingFactor"10integer factor by which the number of latitudinal and longitudinal data points is reduced when importing
  • GTOPO30 internally represents the ocean elevation as meters.


Basic Examples  (3)

Import a GTOPO30 file, rendering it as a relief plot:

Show the import elements available for this file:

Import the latitude and longitude range of the coordinates stored in the file: