Mapping Toolbox | ![]() ![]() |
Reading Elevation Data Interactively
Most of the digital elevation map datasets can also be read using a graphical user interface called demdataui
. The demdataui
panel allows you to read data from ETOPO5, TerrainBase, the satellite bathymetry model, GTOPO30, GLOBE, and DTED.
When you start demdataui,
it scans your MATLAB path for the presence of any of these types of data files. On PCs, it also checks the root directory of CD-ROMs and other drives. You can then choose to read from any of the datasets. If demdataui
has trouble recognizing data that you think it should find, check your path and use the Help button to read about how files are identified.
The Source list shows the datasets that were found. The coverage of each dataset is shown in yellow on the map. Clicking on a different source in the list will update the yellow coverage area. Here is the coverage area for the satellite bathymetry dataset
The map is used to determine how much data to extract. You can look above the map to get an estimate of how large the matrix will be. To reduce the amount of data, click or click and drag on the map to zoom in, or use the Samplefactor slider. A sample factor of 1 reads every point, whereas 2 reads every other point.
Here is the panel after selecting the TerrainBase data and zooming in on the Indian subcontinent
Clicking the Get button reads from the selected dataset at the slider's sample factor and with geographic limits taken from the map. The result of this operation should be a matrix with about 400 by 500 cells, a reasonable amount of data. The result is shown on the map.
If you are not satisfied with the result, press the Clear button to remove all previously read data, and change your choices. When you are ready, save the matrix maps to a MAT-file or the MATLAB workspace by pressing the Save button. The matrices are returned in a geographic data structure, with one entry for each separate "get". You can then use displaym
or mlayers
to add the matrix maps to a map axes. To access the contents of the geographic data structure, use the field names. Here the map and maplegend are popped out of the structure and used to create a lighted three-dimensional elevation map display using worldmap
.
map = demdata.map; maplegend = demdata.maplegend; figure worldmap(map,maplegend,'ldem3d') hidem(gca)
![]() | Digital Terrain Elevation Data Model | Advanced Very High Resolution Radiometer (AVHRR) Global Change Data | ![]() |