| Version 2.0 (R13SP1+) Mapping Toolbox™ Software Release Notes | ![]() |
This table summarizes what's new in Version 2.0 (R13SP1+):
New Features and Changes | Version Compatibility Considerations | Fixed Bugs and Known Problems | Related Documentation at Web Site |
|---|---|---|---|
Yes | Yes — Details in Compatibility Considerations below. See also Summary. | Fixed Bugs, below |
New features and changes introduced in this version are
Mapping Toolbox™ Version 2.0 provides a comprehensive set of functions and graphical user interfaces for building map displays and performing geospatial data analysis in the MATLAB® environment. In this major release of the toolbox, new functions and capabilities include:
Support for standard GIS and geospatial file formats:
ESRI shapefile; GeoTIFF; Arc ASCII Grid; SDTS Raster Profile (read only)
"Worldfiles" for spatially registered images (read and write)
New display functions for vector features, georeferenced imagery, and data grids in x-y map coordinates (as well as unprojected latitude-longitude)
New functions for vector symbolization based on feature attributes
Transverse Mercator projection and PROJ.4 projection library support
A new interactive Map Viewer with the following features:
Support for multiple raster and vector layers
Data import from file or workspace
Zooming/panning/map navigation tools
Cursor coordinate and map-scale readout
Data tip and info tools
Graphical overlays
Map exporting/printing
A major update of the Mapping Toolbox User's Guide, focused on clarifying concepts and terminology, explaining features and functions, adding new and enhancing existing examples, and organizing and cross-referencing material to make the documentation easier to access
Six new Mapping Toolbox demos are now, available from the Demos tab of the Help Browser. You can also access this demos page by typing
mapdemos
The demos consist of the following:
mapexenhance — Enhancing Multispectral GeoTIFF Images
mapexfindcity — Interactive Global City Finder
mapexgeo — Creating Maps using geoshow (for latitude, longitude data)
mapexmap — Creating Maps using mapshow (for x, y data)
mapexrefmat — Creating and Using Referencing Matrices
mapexreg — Georeferencing an Image to an Orthotile Base Layer
viewmaps — GUI Demonstrating Map Projections (not new in 2.0)
Note that the above commands run the demo scripts to produce figures, whereas mapdemos describes and illustrates the demos in the Help Browser.
In addition, a number of new sample data sets containing vector features, digital elevation models, and georeferenced images have been added for use in demos and examples. The new data includes satellite images of the Boston area, topographic grids of the White Mountains in New Hampshire, and vector data for roads and hydrographic features in the Boston area. The data sets are provided in standard geospatial and GIS formats: GeoTIFF, TIFF images with worldfiles, SDTS Raster Profile, Arc ASCII Grid, and ESRI shapefiles. They are accompanied by ASCII text files (with suffix .txt), containing descriptive metadata.
The new data files are in addition to existing sample data sets stored in MAT-files, such as geoid, russia, and korea. In addition, metadata indicating the source and describing the contents of most sample data and atlas data has been added to their respective MAT-files.
To read the metadata for a Mapping Toolbox MAT-file data set, load it and inspect the source and description workspace variables.
To read brief descriptions of the demos and sample data sets, type
help mapdemos
The toolbox includes a new interactive tool for displaying and examining map data, called the Map Viewer. The Map Viewer helps you work with data that is already in a projected map coordinate system, which is the case for many high-resolution satellite and aerial imagery products, as well as many vector map data sets that cover small areas of the Earth in substantial detail. The Map Viewer gives you a view (or views) of an x-y map coordinate plane where, for example, x and y may correspond to the easting and northing coordinates of a given UTM or State Plane zone. If some of your data is referenced to geographic (latitude-longitude) coordinates, you first need to use an appropriate projection to transform it to map coordinates.
Key features of the Map Viewer include:
A two-dimensional view of the x-y map plane with interactive tools for navigating in that plane: magnification, de-magnification, panning, setting the map scale, and zooming the view to the extent of a given data set, or all data sets
Vector and image data import from files or from the MATLAB workspace
Management of each data set in a separate layer. You can control layer ordering and visibility to bring what you need into view.
Multiple, simultaneous views (differing in scale or view extent) of the same data layers
A data tip tool to identify vector shapes or query a feature attribute that you specify
An info tool to display, in a separate window, all the attributes of a selected feature
Tools to annotate the map with lines, arrows, and text
Ability to export a raster snapshot of the map view
To start the Map Viewer, use the mapview function. Typing
mapview
will open a Map Viewer window. You can then import standard format files or load workspace data into the Map Viewer. The following figure shows the Map Viewer's main window after loading image, line, and point data sets, also illustrating user-specified symbology for streets and landmarks, and Data Tip labels for selected point features:

You can print maps as they appear in the Map Viewer window, to either a printer or a file. Either click the Print button on the left end of the toolbar or select Print in the File menu. A standard figure print dialog appears. You should consider selecting a driver appropriate to your printer; this may be necessary if you attempt to print in color.
The toolbox adds support for several industry-standard formats for spatially referenced images and data grids: Arc ASCII Grid files, GeoTIFF files, and worldfiles. You do this by using the following new functions: arcgridread, geotiffinfo, geotiffead, getworldfilename, worldfileread, and worldfilewrite.
The grid and image file-reading functions construct referencing matrices, enabling a general and consistent approach to managing the relationship between map coordinates and pixel columns and rows (see below).
The toolbox includes a family of functions supporting images and gridded data sets that are referenced to two-dimensional projected map coordinates. These functions represent the relationship between a point at position (row,col) in an image and point in map coordinates (x,y) with a referencing matrix. A referencing matrix is a 3-by-2 matrix, R, that represents a general affine transformation such that
[x y] = [row col 1] * R
Most often the image (or data grid) consists of square pixels and has edges that align with the map coordinate axes, but you are not limited to this situation.
The new function makerefmat provides several options for constructing referencing matrices from scratch. See its M-file help for further information. However, you can most often obtain a referencing matrix from a world file, via worldfileread, or from a GeoTIFF file via geotiffread. If you have created a new referencing matrix for an image in a generic image format such as TIFF or JPEG, you can save this information in a world file using worldfilewrite.
New functions pix2map and map2pix implement the basic transformation defined above, along with its inverse. With functions mapbbox and mapoutline you can calculate the image bounds or perimeter in map coordinates. You can use the function pixcenters to calculate the coordinates of the center of each image pixel. This is helpful if you have a data grid that you want to display using surface.
The new function mapshow accepts a referencing matrix in order to correctly position an image in a standard Handle Graphics axes (i.e., not a map axes).
Because the affine transformation is extremely general, it can equally well represent the registration of an image to geographic coordinates, with longitude taking the place of map x and latitude replacing map y:
[lon lat] = [row col 1] * R
A referencing matrix is a more general version of the 1-by-3 map legend vector, perhaps better characterized as a referencing vector, that many toolbox functions already use. To convert a referencing vector to a referencing matrix, you can use function refvec2mat. The inverse transformation exists only for referencing matrices having a special form, but if it does you can compute it with refmat2vec. Functions latlon2pix and pix2latlon support transformations for referencing matrices in geographic coordinates, allowing for longitude-wrapping differences.
Use the new function geoshow along with map axes to display data grids referenced to latitude and longitude via either a referencing vector or a referencing matrix. Or, you can use the new function grid2image to quickly display an unprojected grid with latitude as the ordinate (x-axis) and longitude as the abscissa (y-coordinate).
Mapping Toolbox functions can now import terrain grids stored in United States Spatial Data Transfer Standard (SDTS) raster profile format, giving you access to a wide selection of public domain terrain data sets, principally those prepared by the U.S. Geological Survey (USGS). USGS DEM data is no longer distributed from government Internet sites. Instead, these and other USGS files are now available from a commercial server at no charge. For further information, see http://edc.usgs.gov/products/elevation/dem.html and http://edc.usgs.gov/geodata/.
Two new toolbox functions support SDTS data handling:
sdtsinfo returns a structure containing metadata for an SDTS data set.
sdtsdemread returns elevation data and a referencing matrix from an SDTS DEM data set.
For details, type help sdtsinfo or help sdtsdemread at the MATLAB prompt.
The toolbox now reads the shapefile format defined by Environmental Systems Research Institute (ESRI) and widely used as a data exchange format for nontopological GIS data. You can query a shapefile for its shapetype, attribute names and types, number of records, etc., using shapeinfo, and read 2-D shapes using shaperead. The shaperead function constructs a geostruct2 geographic data structure array (see Geographic Data Structure Enhancements ), tailored to the contents read in from shapefiles.
The shape data is represented in the MATLAB workspace as a 1-D structure array, with one element per feature. Attribute values are stored in structure fields, or in a separate, parallel structure array. Because attributes are defined according to the needs of the shapefile author and might be unknown until the time a given shapefile is read, the new Mapping Toolbox geographic data structures (described below) are necessarily more general than the existing toolbox geographic data structures.
Certain Mapping Toolbox functions introduced in Version 2 use an enhanced geographic data structure layout (called a geostruct2) to store and manipulate vector geodata. This layout has the flexibility to store any kind and number of attributes, and handles either geographic (latitude and longitude) or plane (x and y) coordinates. In contrast, a Version 1 geographic data structure (geostruct1) — which is still supported — is limited to a fixed set of fields and can contain geographic coordinates only.
One way to create a Version 2 geographic data structure is to input vector geodata to the workspace from a shapefile. The function shaperead returns a geostruct2 that encapsulates some or all of the data stored in a shapefile and its supporting index and dBASE files. To determine what kinds of data a shapefiles contains, you can use the shapeinfo function to query it.
The new functions mapshow, geoshow, and mapview each display vector data in geostruct2 form. Use geoshow when Lat and Lon coordinate fields exist in the geostruct, and use mapshow or mapview when X and Y fields are present.
You can transform a geostruct1 into a geostruct2 (but not the reverse). Use the function updategeostruct for this purpose. See Mapping Toolbox™ Geographic Data Structures in the Mapping Toolbox documentation for descriptions of geostruct formats and uses.
Another new function, extractfield, lets you conveniently combine all the values of a given geostruct field into a single array. For example, given a shapefile with a 'Name' attribute, extractfield can output a cell array of feature names from the geostruct returned by shaperead.
When you display shape features as points, lines, or polygons using mapview, mapshow, and geoshow, you can make feature attributes control how they are symbolized. This lets the data control graphic attributes such as color, line width, marker symbol, and visibility on a per-feature basis. In prior versions of the toolbox, attribute-specific symbology was difficult to accomplish, but now a general mechanism exists for this purpose. The new function makesymbolspec generates a structure called a symbolspec that maps specific attribute values (or ranges) to symbology parameters, and lets you specify default parameters for unspecified values. For example, the following symbolspec colors all roads of class 1 red, all roads of class 2 green, all roads of class 3 blue, and defaults other classes to black (where class is an attribute of the road layer):
roadColors = makesymbolspec('Line',{'CLASS',1,'Color','r'},...
{'CLASS',2,'Color','g'},...
{'CLASS',3,'Color','b'},...
{'Default','Color','k'});To see an example of what you can do with symbolspecs, look at the illustration for New Map Viewer. For details, type help shaperead, help mapshow, help geoshow, help mapview, or help makesymbolspec at the MATLAB prompt.
Mapping Toolbox software now incorporates the PROJ.4 cartographic projections library, originally written by Gerald Evenden of the USGS. Currently the toolbox uses this library primarily to support the GeoTIFF format. You can access selected PROJ.4 projections and their inverses using new functions projfwd and projinv. Use the projlist function to learn about which PROJ.4 projections are available. In addition to accepting GeoTIFF info structures, projfwd and projinv also work with a standard map projection structure (mstruct) used to define projections within map axes.
In addition to the major new features just described, this release includes the following enhancements and new functions, among others.
Now accepts 'ellipsoid' as a synonym for 'geoid' as a parameter or refbody value.
A new function that unifies the latitude conversions previously dispersed among functions geod2aut, aut2geod, etc. For a list of the files it replaces, see Functions Obsolete in Version 2.0.
New function for converting a geolocated data grid (general matrix map) to a regular gridded data set (matrix map). Easier to use for this purpose than imbedm, and produces a smoother output with 2-D resampling.
New function to display a regular data grid, with a referencing matrix or referencing vector, as an image. The grid can contain double, uint8, or uint16 values. grid2image replaces the obsoleted function imagem.
A new map projection, Transverse Mercator, has been added. This is a general Transverse Mercator, as opposed to the more specific Universal Transverse Mercator supported by the utm function.
Provides conversion factors among units of length, and between radians and degrees. Supports a wider range of length units than distdim.
For information on using any of these functions, type help function at the MATLAB prompt.
Version 2.0 features many new functions, all of which are itemized below. Several existing functions have been deprecated or deleted. These are described in Functions Obsolete in Version 2.0 and Functions Deleted in Version 2.0.
arcgridread — Read a gridded data set in Arc ASCII Grid Format.
geotiffinfo — Information about a GeoTIFF file
geotiffread — Read a georeferenced image from GeoTIFF file.
getworldfilename — Derive a worldfile name from an image file name.
sdtsdemread — Read data from an SDTS raster/DEM data set.
sdtsinfo — Information about an SDTS data set
shapeinfo — Information about a shapefile
shaperead — Read vector feature coordinates and attributes from a shapefile.
worldfileread — Read a worldfile and return a referencing matrix.
worldfilewrite — Construct a worldfile from a referencing matrix.
extractfield — Extract the field values from a structure.
updategeostruct — Update a geographic data structure.
latlon2pix — Convert latitude-longitude coordinates to pixel coordinates.
makerefmat — Construct an affine spatial-referencing matrix.
map2pix — Convert map coordinates to pixel coordinates.
mapbbox — Compute bounding box of a georeferenced image or data grid.
mapoutline — Compute outline of a georeferenced image or data grid.
pix2latlon — Convert pixel coordinates to latitude-longitude coordinates.
pix2map — Convert pixel coordinates to map coordinates.
pixcenters — Compute pixel centers for georeferenced image or data grid.
refmat2vec — Convert a referencing matrix to a referencing vector.
refvec2mat — Convert a referencing vector to a referencing matrix.
geoloc2grid — Convert a geolocated data array to a regular data grid.
geotiff2mstruct — Convert GeoTIFF info to a map projection structure.
projlist — List map projections supported by projfwd and projinv.
projfwd — Forward map projection using the PROJ.4 library
projinv — Inverse map projection using the PROJ.4 library
tranmerc — Transverse Mercator Projection
geoshow — Display map latitude and longitude data.
grid2image — Display a regular data grid as an image.
mapshow — Display map data.
mapview — Interactive map viewer
makesymbolspec — Construct a vector symbolization specification.
convertlat — Convert between geodetic and auxiliary latitudes.
ind2rgb8 — Convert an indexed image to a uint8 RGB image.
unitsratio — Unit conversion factors
The following changes affect compatibility between Version 2.0 and previous versions of Mapping Toolbox software.
The following functions are still available but should no longer be used:
imagem, which displayed a regular matrix map as an image, has been replaced by grid2image.
The following 12 latitude conversion functions have been replaced by a single utility function, convertlat:
aut2geod
cen2geod
cnf2geod
iso2geod
par2geod
rec2geod
geod2aut
geod2cen
geod2cnf
geod2iso
geod2pa
geod2rec
This improves the stability of numerical results in certain projections.
The following Mapping Toolbox functions are no longer available.
coast — This function simply loaded the coast MAT-file containing world coastlines. Instead of calling it, type
load coast
loadmoonalb — This function simply loaded the moonalb MAT-file of the Moon's albedo. Instead of calling it, type
load moonalb
maskm — This function, which reassigned a scalar value to an array based on a Boolean mask, has been removed. Ordinary MATLAB command syntax does the same thing.
movescale — This undocumented function now is a subfunction of scaleruler.
To achieve greater consistency with the literature on geospatial data handling, Mapping Toolbox documentation for Version 2.0 has changed the usage of certain terms and names of variables provided as sample data. The primary changes are described below.
Geoid — Where it is used to describe the geometric shape of the Earth (an equipotential surface), this term has been retained. Where it was used as a synonym for ellipsoid, occurrences of geoid have been changed to ellipsoid. This includes changing references to geoid vector to ellipsoid vector. You also now specify ellipsoid models for almanac data using the keyword 'ellipsoid' (however, 'geoid' still works). Note that a similar update has not been made for axesm, getm, or setm, which also use 'geoid' as a keyword to identify the geoid field of the map projection structure (mstruct).
Map — Where this term referred to data sets (either raster or vector), occurrences of map have been changed to data grid, data set, or some other appropriate term. Where it refers to a cartographic presentation of geodata, map has been retained.
Map legend — This term, which used to refer to a three-element vector that georeferenced a data grid, has been replaced with referencing vector. In some contexts (when more degrees of freedom are involved), the term referencing matrix replaces it.
Most sample data sets that contain map and maplegend as variables (data grids and referencing vectors, respectively) have been updated. For example, the geoid MAT-file now has variables geoid (the data grid), and geoidrefvec and geoidlegend (referencing vectors; the second is a copy of the first, provided to maintain compatibility). This file, along with most other sample data except for topo and coast, also now contains metadata in the form of source and description strings.
Mapping Toolbox Version 2.0 includes the following bug fixes:
sizem now respects the order of its longitude limits. Now, for example, [r,c] = sizem([-5 5],[170 -170],1) sizes a 10-by-20 grid that crosses the 180-degree meridian, rather than a 10-by-340 grid that extending from -170 all the way to 170. maptriml, maptrimp, and maptrims now respect the order of their longitude limits as well.
This release corrects an error in the inverse UTM projection. This error caused mislocations that ranged from negligible near the central meridian to several meters at the east-west zone boundaries.
This release also removes the rounding that decreased precision of the latitude-longitude outputs.
A new formulation, using the new convertlat function, fixes subtle inaccuracies near the poles that could cause unexpected, hard-to-explain behavior in the stereographic projection.
A problem that caused los2 and viewshed to report some visible points as invisible has been fixed.
![]() | Version 2.0.1 (R13SP1+) Mapping Toolbox™ Software | Version 1.3.1 (R13SP1) Mapping Toolbox™ Software | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |