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.

Mapping
Toolbox™ map projection libraries feature dozens of map projections, which you
principally control with `axesm`

. Some are ancient and well-known (such as
Mercator), others are ancient and obscure (such as Bonne), while some are modern inventions
(such as Robinson). Some are suitable for showing the entire world, others for half of it, and
some are only useful over small areas. When geospatial data has geographic coordinates, any
projection can be applied, although some are not good choices. For more information, see Projection Distortions.

To view a list of supported projections, see Summary and Guide to Projections. For further reading, Bibliography provides references to books and papers on map projection.

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.

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.