## Documentation |

Two angles, *latitude* and *longitude*,
specify the position of a point on the surface of a planet. These
angles can be in degrees or radians; however, degrees are far more
common in geographic notation.

Latitude is the angle between the plane of the equator and a
line connecting the point in question to the planet's rotational axis.
There are different ways to construct such lines, corresponding to
different types of and resulting values for latitudes. Latitude is
positive in the northern hemisphere, reaching a limit of +90º
at the north pole, and negative in the southern hemisphere, reaching
a limit of -90º at the south pole. Lines of constant latitude
are called `parallels`. This system is depicted
in the following figure, commands for which are

load coast axesm('ortho','origin',[45 45]); axis off; gridm on; framem on; mlabel('equator') plabel(0); plabel('fontweight','bold') plotm(lat, long)

*Longitude* is the angle at the center of
the planet between two planes that align with and intersect along
the axis of rotation, perpendicular to the plane of the equator. One
plane passes through the surface point in question, and the other
plane is the *prime meridian* (0º longitude),
which is defined by the location of the Royal Observatory in Greenwich,
England. Lines of constant longitude are called *meridians*.
All meridians converge at the north and south poles (90ºN and
-90ºS), and consequently longitude is under-specified in those
two places.

Longitudes typically range from -180º
to +180º, but other ranges can be used, such as 0º to +360º.
Longitudes can also be specified as east of Greenwich (positive) and
west of Greenwich (negative). Adding or subtracting 360º from
its longitude does not alter the position of a point. The toolbox
includes a set of functions (`wrapTo180`, `wrapTo360`, `wrapToPi`,
and `wrapTo2Pi`) that convert longitudes
from one range to another. It also provides `unwrapMultipart`,
which "unwraps" vectors of longitudes in radians by
removing the artifical discontinuities that result from forcing all
values to lie within some 360º-wide interval.

Was this topic helpful?