Read Global Land One-km Base Elevation (GLOBE) data
[Z,refvec] = globedem(filename,scalefactor)
[Z,refvec] = globedem(filename,scalefactor,latlim,lonlim)
[Z,refvec] = globedem(foldername,scalefactor,latlim,lonlim)
[Z,refvec] = globedem(filename,scalefactor) reads
the GLOBE DEM files and returns the result as a regular data grid.
The filename is given as a character vector that does not include
an extension. GLOBEDEM first reads the ESRI header file found in the
'/esri/hdr/' and then the binary data
file filename. If the files are not found on the MATLAB® path,
they can be selected interactively.
an integer that when equal to 1 gives the data at its full resolution.
scalefactor is an integer
than 1, every
nth point is returned. The map data
is returned as an array of elevations and associated three-element
referencing vector. Elevations are given in meters above mean sea
level, using WGS 84 as a horizontal datum.
[Z,refvec] = globedem(filename,scalefactor,latlim,lonlim) allows
a subset of the map data to be read. The limits of the desired data
are specified as vectors of latitude and longitude in degrees. The
be in ascending order.
[Z,refvec] = globedem(foldername,scalefactor,latlim,lonlim) reads
and concatenates data from multiple files within a GLOBE folder tree.
foldername input is a character vector with
the name of the folder that contains both the uncompressed data files
and the ESRI header files.
GLOBE, the Global Land One-km Base Elevation data, was compiled by the National Geophysical Data Center from more than 10 different sources of gridded elevation data. GLOBE can be considered a higher resolution successor to TerrainBase. The data set consists of 16 tiles, each covering 50 by 90 degrees. Tiles require as much as 60 MB of storage. Uncompressed tiles take between 100 and 130 MB.
Determine the file that contains the area around Cape Cod. (This example assumes you have already downloaded some GLOBE data tiles.)
latlim = [41 42.5]; lonlim = [-73 -69.9]; globedems(latlim,lonlim) ans = 'f10g'
Extract every 20th point from the tile covering the northeastern
United States and eastern Canada. If you specify an empty file name
a file browser that you use to first select the header file and then
select the data file interactively.
[Z,refvec] = globedem('',20); size(Z) ans = 300 540
Extract a subset of the data for Massachusetts at the full resolution.
latlim = [41 42.5]; lonlim = [-73 -69.9]; [Z,refvec] = globedem('f10g',1,latlim,lonlim); size(Z) ans = 181 373
NaNs in the ocean with -1 to
color them blue.
Z(isnan(Z)) = -1;
Extract some data for southern Louisiana in an area that straddles
two tiles. Provide the name of the folder containing the data files,
globedem determine which files are required,
read from the files, and concatenate the data into a single regular
latlim =[28.61 31.31]; lonlim = [-91.24 -88.62]; globedems(latlim,lonlim) ans = 'e10g' 'f10g' [Z,refvec] = globedem('d:\externalData\globe\elev',1,latlim,lonlim); size(Z) ans = 325.00 315.00
globedem function reads data from GLOBE
Version 1.0. The data is for elevations only. Elevations are given
in meters above mean sea level using WGS 84 as a horizontal datum.
Areas with no data, such as the oceans, are coded with
The data set and documentation are available over the Internet.
For details on locating map data for download over the Internet, see the following documentation at the MathWorks Web site: Finding Geospatial Data.
See Web site for the National Oceanic and Atmospheric Administration, National Geophysical Data Center