Mapping Toolbox    

Creating Base Maps

Geographic data is usually displayed on a base map containing features like coastlines or topography. The first step in the preparation of a base map is the selection of an appropriate projection. Projections are ways of representing features from a round body on a flat piece of paper or computer screen. The art of displaying a three-dimensional body on a two-dimensional surface is called cartography. Cartographers have devised many different projections, each a different compromise between fidelity of scale, shape, and direction. The art in cartography is partly the selection of a projection that is appropriate to the task at hand. The next step in the preparation of a base map is the selection and display of appropriately detailed atlas data. It is important that the detail and amount of data be matched to the coverage of the base map.

Although the Mapping Toolbox provides full control over a large number of projections and several kinds of atlas data, it can also create base maps that are good for most applications. The command to create a base map for the earth is worldmap. The worldmap command chooses a projection and atlas data detail appropriate to the area you specify. You can define the area by the name of a continent or a country, or by latitude and longitude limits. If you are unsure of the spelling of a name, use worldmap with no input arguments to pick the name from a list:

The hidem(gca) command hides the MATLAB axes box for printing. It is usually best to hide the axes just before you print.

In this case, worldmap selected low-resolution atlas data because of the large area covered by the continent. The atlas data includes coastlines, international boundaries, lakes, and cities. For maps of large areas, such as South America, worldmap chooses the lower resolution data and omits details like country names and cities. You can override worldmap's choices using optional arguments.

As you specify smaller regions, worldmap switches to higher resolution atlas data. Here is a base map of Pakistan using patches (filled polygons) instead of lines. This display also adds a common cartographic element, a graphic scale. You can use your mouse to drag the scale ruler to a better position. See the help for scaleruler and setm to change other properties:

To change the alignment or adjust the positions of the city names, use the click and drag tools described in GUI Tools.

You can also specify the region of interest by latitude and longitude limits. The following example constructs a base map of the Persian Gulf. This example also shows how to use MATLAB Handle Graphics® and Mapping Toolbox commands to change graphic properties like color of the countries and the underlying map frame. For more information on map and Handle Graphics properties, see Mapping Fundamentals in this document or in the online Mapping Toolbox reference documentation; you can also find guidance in the MATLAB graphics documentation:

You can also construct a base map using matrix data. The Mapping Toolbox defines two kinds of matrix data. Regular matrix maps are on an equal-angle grid, with rows and columns aligned to the east-west and north-south. General matrix maps can have arbitrary spacing and alignment of matrix elements.

Here is an example of a regular matrix map for the whole world. The geoid workspace file contains a matrix of geoid heights on a one-degree grid. The geoid can be thought of as the surface of the ocean without the influence of waves, tides, or land. When you provide worldmap a regular matrix map, the geographic limits are taken from the extent of the matrix. Here the geoid height (in meters) is shown as a colored surface. The contourcmap command creates a colormap with the color steps aligned to contour levels, making values easier to read from the display. Displaying Maps will show you how to add matrix displays to an existing base map:

Other colors are typically used to display elevation matrices. Data of this type is often referred to as a Digital Elevation Map, or DEM. Here is an example that shows elevation and bathymetry for the Korean peninsula as a three-dimensional lighted surface. There is a very large amount of vertical exaggeration to bring out the topographic features. Use the daspectm command to control the vertical scaling:

For base maps of the United States of America, use the similar usamap command; to display just the conterminous states, use usamap conus:

To display smaller regions with higher resolution atlas data, use the state name or latitude and longitude limits:

When you need more control over the projection and base map data, use the lower level axesm command instead of worldmap or usamap. The axesm command is used to prepare a map axes and set the initial projection parameters. You can then add the atlas data of your choice. Here is a display using the orthographic projection with low-resolution filled country outlines. The orthographic projection looks like the globe viewed from an infinite distance. Use the maps command to see a full list of the available projections:


  Getting Started Displaying Data on a Base Map