etopo
(Removed) Read gridded global relief data (ETOPO products)
The etopo
function has been removed. Use the readgeoraster
function instead. For more information, see Version History.
Syntax
[Z, refvec] = etopo
[Z, refvec] = etopo(samplefactor)
[Z, refvec] = etopo(samplefactor, latlim, lonlim)
[Z, refvec] = etopo(folder, ...)
[Z, refvec] = etopo(filename, ...)
[Z, refvec] = etopo({'etopo5.northern.bat', 'etopo5.southern.bat'},
...)
Description
[Z, refvec] = etopo
reads the ETOPO data for the entire world from
the ETOPO data in the current folder. For more information about ETOPO data, see the ETOPO Global
Relief Model website. The etopo
function searches the current
folder first for ETOPO1c binary data, then ETOPO2V2c binary data, then ETOPO2 (2001) binary
data, then ETOPO5 binary data, and finally ETOPO5 ASCII data. Once the function finds a
case-insensitive file name match, it reads the data. See Tips for a
list of possible file names. The etopo
function returns the data grid,
Z
, as an array of elevations. Data values, in whole meters, represent
the elevation of the center of each cell. refvec
, the associated
three-element referencing vector, geolocates Z
.
[Z, refvec] = etopo(samplefactor)
reads the data for the entire
world, downsampling the data by samplefactor
. The scalar integer
samplefactor
when equal to 1 gives the data at its full resolution
(10800 by 21600 values for ETOPO1 data, 5400 by 10800 values for ETOPO2 data, and 2160 by
4320 values for ETOPO5 data). When samplefactor
is an integer
n greater than one, the etopo
function returns
every nth point. If you omit
samplefactor
or leave it empty, it defaults to 1. (If the
etopo
function reads an older, ASCII ETOPO5 data set, then
samplefactor
must divide evenly into the number of rows and columns
of the data file.)
[Z, refvec] = etopo(samplefactor, latlim, lonlim)
reads the data
for the part of the world within the specified latitude and longitude limits. Specify the
limits of the desired data as two-element vectors of latitude, latlim
,
and longitude, lonlim
, in degrees. Specify the elements of
latlim
and lonlim
in ascending order. Specify
lonlim
in the range [0 360]
for ETOPO5 data and
[-180 180]
for ETOPO2 and ETOPO1 data. If latlim
is empty, the latitude limits are [-90 90]. If lonlim
is empty, the file
type determines the longitude limits.
[Z, refvec] = etopo(folder, ...)
allows you to use the variable
folder
to specify the path for the ETOPO data file. Otherwise, the
etopo
function searches the current folder for the data.
[Z, refvec] = etopo(filename, ...)
reads the ETOPO data from the
file specified by the case-insensitive string scalar or character vector
filename
. The name of the ETOPO file is as referenced in the ETOPO
data file names table. Include the folder name in filename
or place the
file in the current folder or in a folder on the MATLAB path.
[Z, refvec] = etopo({'etopo5.northern.bat', 'etopo5.southern.bat'},
...)
reads the ETOPO data from the specified case-insensitive ETOPO5 ASCII data
files. Place the files in the current folder or in a folder on the MATLAB path.
Examples
Read and display ETOPO2V2c data from the file
'ETOPO2V2c_i2_LSB.bin'
downsampled to half-degree cell size and
display the boundary of the land areas.
samplefactor = 15; [Z, refvec] = etopo('ETOPO2V2c_i2_LSB.bin', samplefactor); figure worldmap world geoshow(Z, refvec, 'DisplayType', 'texturemap'); demcmap(Z, 256); geoshow('landareas.shp', 'FaceColor', 'none', ... 'EdgeColor', 'black');
Tips
The etopo
function supports these ETOPO data files.
Format | File Names |
---|---|
ETOPO1c (cell) |
|
ETOPO2V2c (cell) |
|
ETOPO2 (2001) |
|
ETOPO5 (binary) |
|
ETOPO5 (ASCII) |
|
References
[1] “2-minute Gridded Global Relief Data (ETOPO2v2),” U.S. Department of Commerce, National Oceanic and Atmospheric Administration, National Geophysical Data Center, 2006.
[2] Amante, C. and B. W. Eakins, “ETOPO1 1 Arc-Minute Global Relief Model: Procedures, Data Sources and Analysis,” NOAA Technical Memorandum NESDIS NGDC-24, March 2009.
[3] “Digital Relief of the Surface of the Earth,” Data Announcement 88-MGG-02, NOAA, National Geophysical Data Center, Boulder, Colorado, 1988.
[4] “ETOPO2v2 Global Gridded 2-minute Database,” National Geophysical Data Center, National Oceanic and Atmospheric Administration, U.S. Dept. of Commerce.