You can browse many formats of digital elevation map data using
demdataui graphical user interface. The
determines and graphically depicts coverage of ETOPO5, TerrainBase,
the satellite bathymetry model (SATBATH), GTOPO30, GLOBE, and DTED
data sets on local and network file systems, and can import these
files into the workspace.
When it opens,
You can choose to read from any of the data sets
demdataui does not recognize data you
think it should find, check your path and click Help to
read about how files are identified.
This exercise illustrates how to use the
You will not necessarily have all the DEM data sets shown in this
example. Even if you have only one (the DTED used in the previous
exercise, for example), you can still follow the steps to obtain your
It scans the path for data before it is displayed:
The Source list in the left pane shows the data sets that were found. The coverage of each data set is indicated by a yellow tint on the map with gray borders around each tile of data. Here, the source is selected to present all DTED files available to a user.
Clicking a different source in the left column updates the coverage display. Here is the coverage area for available GTOPO30 tiles.
Use the map in the UI to specify the location and density of data to extract. To interactively set a region of interest, click in the map to zoom by a factor of two centered on the cursor, or click and drag across the map to define a rectangular region. The size of the matrix of the area currently displayed is printed above the map. To reduce the amount of data, you can continue to zoom in, or or you can raise the Samplefactor slider. A sample factor of 1 reads every point, 2 reads every other point, 3 reads every third point, etc. The matrix size is updated when you move the Samplefactor slider.
Here is the UI panel after selecting ETOPO30 data and zooming in on the Indian subcontinent.
To see the terrain you have windowed
at the sample factor you specified, click the Get button.
This causes the GUI map pane to repaint to display the terrain grid
demcmap colormap. In this example, the
data grid contains 580-by-568 data values, as shown below.
If you are not satisfied with the result,
click the Clear button to remove
all data previously read in via Get and
make new selections. You might need to close and reopen
order to select a new region of interest.
When you are ready to import DEM data
to the workspace or save it as a MAT-file, click the Save button.
Select a destination and name the output variable or file. You can
save to a MAT-file or to a workspace variable. The
returns one or more matrices as an array of display structures, having
one element for each separate
get you requested
(assuming you did not subsequently Clear).
You then use
add the data grids to a map axes.
The data returned by
display structures. You cannot update these to geographic data structures
(geostructs) using the
because they are of type
surface, which the updating
function does not recognize. However, you can still display them with
as shown in the next step.
To access the contents of the display
structure, use its field names. Here
copied from the structure and used to create a lighted three-dimensional
elevation map display using
the default name for the structure, which you can override when you
Z = demdata.map; refvec = demdata.maplegend; figure ax = worldmap(Z, refvec); geoshow(ax, Z, refvec, 'DisplayType', 'texturemap'); axis off demcmap(Z);