Main Content

Humans have known that the shape of the Earth resembles a sphere and not a flat surface since classical times, and possibly much earlier than that. If the world were indeed flat, cartography would be much simpler because map projections would be unnecessary.

A *map projection* is a procedure that flattens a curved surface such
as the Earth onto a plane. Usually this is done through an intermediate surface such as a
cylinder or a cone, which is then unwrapped to lie flat. Consequently, map projections are
classified as cylindrical, conical, and azimuthal (a direct transformation of the surface of
part of a spheroid to a circle). See The Three Main Families of Map Projections for
discussions and illustrations of how these transformations work. The toolbox can project both
vector data and raster data.

Get a map projection by using a `projcrs`

object. For
example, get information about a raster data file by creating a `RasterInfo`

object. Then, find the projection method by querying the
`CoordinateReferenceSystem`

property of the object.

```
info = georasterinfo('boston.tif');
info.CoordinateReferenceSystem.ProjectionMethod
```

ans = "Lambert Conic Conformal (2SP)"

Alternatively, Mapping Toolbox™ includes a library of map projections that you can control with `axesm`

and `defaultm`

. Some are suitable for showing the
entire world, others for half of it, and some are only useful over small areas. For more
information, see Projection Distortions. For a
list of available projections, see Summary and Guide to Projections. If you want to use a
projection that is not included in this list, create a `projcrs`

object
instead.

Project coordinates by using the `projfwd`

function and unproject coordinates using the `projinv`

function.

When geospatial data has plane coordinates (i.e., it comes preprojected, as do many
satellite images and municipal map data sets), it is usually possible to recover geographic
coordinates if the projection parameters and datum are known. Using this information, you
can perform an *inverse projection*, running the projection backward to
solve for latitude and longitude. The toolbox can perform accurate inverse projections for
any of its projection functions as long as the original projection parameters and reference
ellipsoid (or spherical radius) are provided to it.

**Note**

Converting a position given in latitude-longitude to its equivalent in a projected map
coordinate system involves converting from units of angle to units of length. Likewise,
unprojecting a point position changes its units from those of length to those of angle).
Unit conversion functions such as `deg2km`

and
`km2deg`

also convert coordinates between angles and lengths, but do
not transform the space they inhabit. You cannot use them to project or unproject
coordinate data.

All map projections introduce distortions compared to maps on globes. Distortions are inherent in flattening the sphere, and can take several forms:

Areas — Relative size of objects (such as continents)

Directions — Azimuths (angles between points and the poles)

Distances — Relative separations of points (such as a set of cities)

Shapes — Relative lengths and angles of intersection

Some classes of map projections maintain areas, and others preserve local shapes, distances, or directions. No projection, however, can preserve all these characteristics. Choosing a projection thus always requires compromising accuracy in some way, and that is one reason why so many different map projections have been developed. For any given projection, however, the smaller the area being mapped, the less distortion it introduces if properly centered. Mapping Toolbox tools help you to quantify and visualize projection distortions.

[1] Snyder, J. P. "Map Projections –
A working manual." *U.S. Geological Survey Professional Paper 1395*.
Washington, D.C.: U.S. Government Printing Office, 1987. doi:10.3133/pp1395

[2] Maling, D. H.
*Coordinate Systems and Map Projections*. 2nd ed. New York: Pergamon
Press, 1992.

[3] Snyder, J. P., and P. M.
Voxland. "An album of map projections." *U.S. Geological Survey Professional Paper
1453*. Washington, D.C.; U.S. Government Printing Office, 1989.
doi:10.3133/pp1453

[4] Snyder, J. P.
*Flattening the Earth – 2000 Years of Map Projections*. Chicago, IL:
University of Chicago Press, 1993.