Mapping Toolbox | ![]() ![]() |
Working with External Data
While the Mapping Toolbox atlas data described in Chapter 4 is suitable for world or regional maps, more detailed data is usually required for larger scale maps. The best sources of such data are often national mapping agencies, who make their data available to the public at little or no charge, often over the Internet or on CD-ROM. United States government publications are generally free of copyright, allowing free re-use of the data.
Although the Mapping Toolbox can easily display such geographic data once it is in the MATLAB environment, importing it is often difficult because of complicated data file formats. To make these detailed datasets readily accessible, The Mapping Toolbox provides a number of external data interface functions. These functions allow you to read the data into Mapping Toolbox data types such as regular and general matrix maps and geographic data structures.
A wide variety of data is accessible through these external interface functions. There are vector map data of political entities ranging from national and local government boundaries, infrastructure such as roads, railroads, airports and utilities, and geographic data such as coastlines, rivers, elevation contours, and land use. The Earth's surface and ocean elevations are available on regular grids at a number of different resolutions. Astronomical data in the form of star databases is also available.
Many other types of data can be imported to MATLAB beyond the specialized data file formats accessed by the external interface functions. The most important are mapped scientific data in the form of HDF files and JPEG files. See the MATLAB documentation for the imfinfo and imread functions for more information on how to read these file formats.
![]() | Creating a Personalized Colormap | Global Vector Data | ![]() |