gtopo30
(Removed) Read 30-arc-second global digital elevation data (GTOPO30)
The gtopo30
function has been removed. Use the readgeoraster
function instead. For more information, see Version History.
Syntax
[Z,refvec] = gtopo30(tilename)
[Z,refvec] = gtopo30(tilename,samplefactor)
[Z,refvec] = gtopo30(tilename,samplefactor,latlim,lonlim)
[Z,refvec] = gtopo30(foldername, ...)
Description
[Z,refvec] = gtopo30(tilename)
reads the GTOPO30
tile specified by tilename
and returns the result as a regular data grid.
tilename
is a string scalar or character vector which does not include an
extension and indicates a GTOPO30 tile in the current folder or on the MATLAB® path. If tilename
is empty or omitted, a file browser will
open for interactive selection of the GTOPO30 header file. The data is returned at full
resolution with the latitude and longitude limits determined from the GTOPO30 tile. The data
grid, Z
, is returned as an array of elevations. Elevations are given in
meters above mean sea level using WGS84 as a horizontal datum. refvec
is
the associated referencing vector.
[Z,refvec] = gtopo30(tilename,samplefactor)
reads
a subset of the elevation data from tilename
.
samplefactor
is a scalar integer, which when equal to 1 reads the data at
its full resolution. When samplefactor
is an integer n greater than one,
every nth point is read. If samplefactor
is omitted or empty, it defaults
to 1.
[Z,refvec] = gtopo30(tilename,samplefactor,latlim,lonlim)
reads a subset of the elevation data from tilename
using the latitude and
longitude limits latlim
and lonlim
specified in degrees.
latlim
is a two-element vector of the form:
[southern_limit northern_limit]
Likewise, lonlim
has the form:
[western_limit eastern_limit]
If latlim
and lonlim
are omitted, the coordinate
limits are determined from the file. The latitude and longitude limits are snapped outward to
define the smallest possible rectangular grid of GTOPO30 cells that fully encloses the area
defined by the input limits. Any cells in this grid that fall outside the extent of the tile
are filled with NaN.
[Z,refvec] = gtopo30(foldername, ...)
is similar
to the syntaxes above except that GTOPO30 data are read and concatenated from multiple tiles
within a GTOPO30 CD-ROM or folder structure. The foldername
input is a
string scalar or character vector with the name of the folder which contains the GTOPO30 tile
folders or GTOPO30 tiles. Within the tile folders are the uncompressed data files. The
foldername
for CD-ROMs distributed by the USGS is the device name of the
CD-ROM drive. As with the case with a single tile, any cells in the grid specified by
latlim
and lonlim
are NaN filled if they are not
covered by a tile within foldername
. samplefactor
if
omitted or empty defaults to 1. latlim
if omitted or empty defaults to
[-90 90]
. lonlim
if omitted or empty defaults to
[-180 180]
.