Version 2.0 (R13SP1+) Mapping Toolbox™ Software

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
Details below

Yes — Details in Compatibility Considerations below. See also Summary.

Fixed Bugs, below

V2.0.1 product documentation

New features and changes introduced in this version are

Release Summary

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:

New Demos and Sample Data

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:

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

New Map Viewer

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:

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.

Spatially Referenced Image Formats

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).

Working with Images Referenced to Map Coordinates

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).

SDTS Terrain Data Access

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:

For details, type help sdtsinfo or help sdtsdemread at the MATLAB prompt.

Shapefiles and Vector Features

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.

Geographic Data Structure Enhancements

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.

Attribute-Driven Vector Data Symbolization

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.

Access to PROJ.4 Map Projections

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.

Minor Enhancements

In addition to the major new features just described, this release includes the following enhancements and new functions, among others.

almanac

Now accepts 'ellipsoid' as a synonym for 'geoid' as a parameter or refbody value.

convertlat

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.

geoloc2grid

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.

grid2image

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.

tranmerc

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.

unitsratio

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.

Summary of Functions Added in Version 2.0

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.

Geospatial Data Import and Access

Vector Map Data and Geographic Data Structures

Spatial Referencing of Georeferenced Images and Data Grids

Map Projection Properties and Transformations

Map Display and Interaction

Geographic Calculations

Utilities

Compatibility Considerations

The following changes affect compatibility between Version 2.0 and previous versions of Mapping Toolbox software.

Functions Obsolete in Version 2.0

The following functions are still available but should no longer be used:

This improves the stability of numerical results in certain projections.

Functions Deleted in Version 2.0

The following Mapping Toolbox functions are no longer available.

Changes in Nomenclature

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.

Fixed Bugs

Mapping Toolbox Version 2.0 includes the following bug fixes:

sizem

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.

Fixed Error in Inverse UTM Projection

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.

Improved Numerical Behavior of Geodetic-to-Conformal Latitude Conversion

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.

Line-of-Sight Computation Corrected for Observer at Zero Elevation

A problem that caused los2 and viewshed to report some visible points as invisible has been fixed.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS