You can map data represented as a matrix (a 2-D MATLAB® array) in which each row-and-column element corresponds to a rectangular patch of a specific geographic area, with implied topological connectivity to adjacent patches. This is commonly referred to as raster data. Raster is actually a hardware term meaning a systematic scan of an image that encodes it into a regular grid of pixel values arrayed in rows and columns.
When data in raster format represents the surface of a planet, it is called a data grid, and the data is stored as an array or matrix. The toolbox leverages the power of MATLAB matrix manipulation in handling this type of map data. This documentation uses the terms raster data and data grid interchangeably to talk about geodata stored in two-dimensional array form.
A raster can encode either an average value across a cell or a value sampled (posted) at the center of that cell. While geolocated data grids explicitly indicate which type of values are present (see Geolocated Data Grids), external metadata/user knowledge is required to be able to specify whether a regular data grid encodes averages or samples of values. To see an example, view Generate Shaded Relief Map using Raster Data.
When raster geodata consists of surface elevations, the map can also be referred to as a digital elevation model/matrix (DEM), and its display is a topographical map. The DEM is one of the most common forms of digital terrain model (DTM), which can also be represented as contour lines, triangulated elevation points, quadtrees, octree, or otherwise.
topo global terrain data is an example of a DEM. In this
180-by-360 matrix, each row represents one degree of latitude, and each column
represents one degree of longitude. Each element of this matrix is the average
elevation, in meters, for the one-degree-by-one-degree region of the Earth to which
its row and column correspond.
Raster geodata also encompasses georeferenced imagery. Like data grids, images are
organized into rows and columns. There are subtle distinctions, however, which are
important in certain contexts. One distinction is that an image may contain RGB or
multispectral channels in a single array, so that it has a third (color or spectral)
dimension. In this case a 3-D array is used rather than a 2-D (matrix) array.
Another distinction is that while data grids are stored as class double in the
toolbox, images may use a range of MATLAB storage classes, with the most common being
logical. Finally, for grayscale and RGB images of class
double, the values of individual array elements are constrained to the interval
In terms of georeferencing—converting between column/row subscripts and 2-D map or geographic coordinates—images and data grids behave the same way (which is why both are considered to be a form of raster geodata). However, when performing operations that process the values raster elements themselves, including most display functions, it is important to be aware of whether you are working with an image or a data grid, and for images, how spectral data is encoded.