Software by Jeff Bourdier

Geodesy

Geodesy is the study of the spatial representation and measurement (the shape and size, if you like) of our planet (though it could be applied to any planet, but for the purpose of this discussion, it applies to Earth). A fundamental understanding of geodesy is essential to the GIS work that I do, so I find it instructive to have a "reference guide" of sorts such as this, as these concepts figure frequently into my coding.

The Geoid

The earth is round, but not perfectly. Earth is often thought of as being spherical, which it nearly is, but it also rotates about on an axis. The inertia of this motion has a "flattening" effect, causing the earth more to resemble a flattened (or oblate) spheroid (i.e., an ellipsoid).

Sphere vs. oblate spheroid

What this means is that -- unlike a sphere, which has one radius -- the earth has two different radii: an equatorial radius, of about 6,378 km (3,963 mi), and a polar radius, of about 6,357 km (3,950 mi). Notice that because the earth resembles an oblate (flattened) spheroid, its polar radius is shorter than its equatorial radius -- ever so slightly, only by about 21 km (13 mi), or about 0.3%. This also means that at any point on the earth's surface, the radius, diameter, and circumference of the planet vary based on (among other things) distance from the equator, but will be longest at the equator (and shortest at the poles). The equatorial circumference of Earth is about 40,076 km (24,902 mi).

To take it a step further, a shape called the geoid has been developed. The geoid is a theoretical surface of the earth that is perpendicular at every point to the direction of gravity; it approximates mean sea-level in open ocean (without tides, waves, or swell). This figure might be imagined as an ellipsoid (specifically, an oblate spheroid) with a bunch of little bumps on it. In practice, however, it is not feasible to simulate the geoid computationally, so we settle for a spheroid (also called a reference ellipsoid, or an Earth ellipsoid) that closely approximates the geoid.

Several spheroids (or Earth ellipsoids) have been developed over the years. The first in wide use in North America was developed by British geodesist Alexander Clarke in 1866. The two most commonly used today are Geodetic Reference System 1980 (GRS 80) and World Geodetic System 1984 (WGS 84), the latter of which is used by most modern GPS devices. GRS 80 and WGS 84 are nearly identical (the latter being largely based on the former); both are generally accurate (to the geoid) to within a hundred meters, or about 0.00002% of Earth's (shorter) polar radius.

Latitude and Longitude

A point on the surface of a reference ellipsoid is measured by three things:

  1. Distance from the center (i.e., radius),
  2. Angle from the plane that intersects the equator (i.e., latitude), and
  3. Angle from some fixed plane that intersects the poles (i.e., longitude).

Mathematically, these three things are known as spherical coordinates. Since, as stated earlier, the radius varies with distance from the equator, to be most accurate, we would have to use a different radius depending on the latitude of our surface point. However, since the variation is so small (about 0.3%, remember), we often use a mean Earth radius of 6371 km.

There is exactly one plane that intersects the equator; angular distance above (north of) or below (south of) this plane is called latitude.

Point on surface of spheroid, at 30° (north) latitude

There are infinitely many planes that intersect the poles. Based on research conducted at a London observatory in the nineteenth century, one has been established as the fixed plane mentioned above. Angular distance from this plane is called longitude. The intersection of this plane with the ellipsoid makes a great ellipse (commonly called a great circle, though this term really applies only to spheres and not spheroids) that divides the planet into eastern and western hemispheres. The half of this great ellipse (or circle) that passes through London is called the prime meridian, which defines zero degrees longitude. (The other half, which passes mostly through the Pacific Ocean, is called the antimeridian. Its angle of longitude is 180 degrees, and it corresponds roughly to the International Date Line.)

Point on surface of spheroid, at -96° (west) longitude
(looking down at spheroid from above north pole)

Referring to the two figures above, for a given latitude, an infinite number of points could be drawn on the surface of the spheroid. When connected, these points constitute a line (or circle, as viewed in the latter figure) of equal latitude. Such lines are called parallels (for presumably obvious reasons). Likewise, for a given longitude, an infinite number of points could be drawn and connected to make a line (or ellipse/circle, again depending on the viewpoint) of equal longitude. However, unlike lines of equal latitude, these lines are not parallel; the distances between them vary with latitude. These distances are greatest at the equator and zero at each pole, where all such lines converge (intersect). These lines of equal longitude are called (perhaps not surprisingly, from our discussion above) meridians.

Angles vs. Distances

As previously stated, latitude and longitude (along with radius) are spherical coordinates. As such, it is important to remember that latitude and longitude are angles, not distances. Longitude and latitude are often referred to (erroneously, IMHO) as 'x' and 'y' (respectively), and one common mistake made by less experienced GIS professionals is to treat these values as if they were Cartesian coordinates, using the Pythagorean theorem to calculate Euclidean distance between two points on the surface of the spheroid. This will not work. Cartesian coordinates are distances along perpendicular axes in a two-dimensional (2D) plane, whereas latitude and longitude are angles from perpendicular planes that intersect a three-dimensional (3D) spheroid.

If the surface of Earth were flat, then it would indeed be valid to use Cartesian coordinates (in some linear unit, like meters) to calculate such distances; however, the surface of Earth is curved, so strictly speaking, Cartesian coordinates cannot be used to calculate distances. (In practice, Cartesian coordinates are in fact used, but only after the (curved) surface of the earth has been projected onto a flat surface, which is still not entirely accurate, but such projections are designed to preserve as much accuracy as possible based on particular needs -- more on this later.)

Perhaps the temptation to use latitude and longitude (as Cartesian coordinates) to calculate surface distance arises from the fact that much geographical data is stored as latitude and longitude (probably because it was collected by GPS). One may be inclined to ask "how long" a degree of latitude or longitude is, but the answer differs depending on where we are on the surface of the globe. This is true of both latitude and longitude, but especially of longitude.

Recall from our discussion above that although lines of equal latitude are parallel, lines of equal longitude (meridians) are not, and the distances between them vary with latitude. For example, along the equator (0° latitude), where these distances are greatest, one degree of longitude is about 111 km (69 mi) on the surface. At 30° latitude (or "the 30th parallel," as some prefer to say), one degree of longitude is closer to 96 km (60 mi) on the surface. At 60° latitude, the surface distance equivalent to one degree of longitude is shorter still, at about 56 km (35 mi). At the poles (90° latitude), where the meridians converge, one degree of longitude is equivalent to a surface distance of zero, as mentioned above.

The variance is much smaller with latitude. The surface distance equivalent to one degree of latitude increases with latitude (i.e., it is shortest at the equator and longest at the poles). One degree of latitude is equivalent to a surface distance of about 110.6 km (68.7 mi) at the equator, and closer to 111.7 km (69.4 mi) at the poles.

It should be noted that it is possible to calculate the distance between two points on the surface of the earth using spherical coordinates (radius, latitude, and longitude), just not via the Pythagorean theorem, as it would be with Cartesian coordinates. Remember that Earth's surface is curved, so the surface distance between these two points is not a straight line, but a curved line (i.e., an arc), so rather than computing "straight-line" (Euclidean) distance between them, you would calculate the great-circle distance between them. A number of formulas (such as the commonly used haversine formula) exist for this calculation, most of which are accurate to within 0.5%. (This is where that aforementioned mean Earth radius comes in handy.)

Degrees, Minutes, and Seconds

Although latitude and longitude are often expressed as decimal degrees (e.g., -95.56°), they may also be expressed as degrees, minutes, and seconds (DMS). Minutes and seconds here (also called arc-minutes and arc-seconds, respectively) are just like minutes and seconds of clock time: 60 seconds = 1 minute, and 60 minutes = 1 degree. Unlike clock time, however, arc-minutes and arc-seconds are not written as colon-separated values; rather, apostrophe (or single-quote) means arc-minutes, and double-quote means arc-seconds (e.g., 95°33'36"W). (Note that when written in DMS format, direction (N, S, E, or W) is preferred over sign; hence, 95°33'36"W instead of -95°33'36".)

Decimal Degrees (DD) vs. DMS - Examples
DDDMS
29.55°29°33'00"N
-95.56°95°33'36"W
51.48°51°28'40"N
-31.95°31°57'08"S
115.86°115°51'32"E

Just like latitude and longitude (for minutes and seconds are merely fractions thereof), the surface distance equivalent to an arc-minute or arc-second varies with latitude. Generally speaking, one arc-minute of latitude equals one arc-minute of longitude at the equator, the equivalent surface distance being about 1800 m, or 6000 ft (a little over a mile). An arc-second of latitude, which equals an arc-second of longitude at the equator, is equivalent to about 30 m (100 ft) on the surface.

Datums

In addition to the Earth ellipsoids mentioned above, there is a concept called a datum. A datum is the combination of a spheroid and an origin (or "tie point"), where the spheroid and the earth coincide (i.e., where the spheroid "attaches" to the earth). Two datums that have been commonly used over the years are North American Datum of 1927 (NAD 27) and North American Datum of 1983 (NAD 83).

NAD 27 uses the Clarke 1866 spheroid, and its origin is Meades Ranch (a survey marker in Kansas at about 39°N and 98°W, approximating the geographic center of the 48 contiguous United States.) NAD 27 is the basis for the well-known USGS 7.5-minute quadrangle maps. NAD 83 uses the GRS 80 spheroid, and its origin is the mass-center of Earth.

WGS 84 is also often referred to as a datum. When used in this context, its origin is also the mass-center of Earth, which makes it nearly identical to NAD 83.

Projections

As mentioned earlier, the (curved) surface of the earth is often projected onto a flat surface. This is very useful, as it allows us to do things like print paper maps, display maps on computer screens, and (as mentioned above) even calculate distances using Cartesian coordinates, as if the surface of Earth were flat. As with any 3D surface represented on a 2D surface, some distortion is inevitable when projecting Earth's surface onto a flat surface. Also as mentioned earlier, though, these map projections, as they are called, are designed to preserve as much accuracy as possible based on particular needs.

Generally speaking, a map projection can preserve one of the following properties:

Although we speak of projecting the surface of Earth onto a "flat" surface, it is not necessarily a plane onto which the surface is projected. A better way of putting it would be, "to project the surface of Earth onto a surface (called a developable surface) that can be flattened out onto a (2D) plane without distortion." The "developable" surface could be a plane, a cylinder, or a cone. Map projections are often classified by which of these surface types (or "geometric models") is used, as follows:

The developable surface, when flattened into a plane, effectively becomes a Cartesian coordinate system, in which the Pythagorean theorem can be used to calculate Euclidean (straight-line) distance between any two points, given their 2D coordinates (x, y). (This is admittedly a bit easier than using the haversine formula.) Here, x and y, being Cartesian coordinates, are distances along perpendicular axes (converging at an origin) and are measured in linear units (e.g., meters or miles). Thus, the projection gives the "flat" appearance of a map that we're all used to.

Each class of projection has a set of parameters, summarized as follows:

Class of Projection Parameters
Planar / Azimuthal / Zenithal
  • Coordinates (latitude and longitude) of point of tangency
Conical
  • Standard parallel(s) (line of tangency or lines of secancy)
  • Central meridian (a generatrix down the center of the cone, opposite the aforementioned cut)
Cylindrical
  • If oblique, great circle
  • Otherwise:
    • Central meridian
    • If not transverse, standard parallel(s)

In addition, every projection has an origin (where the x and y axes converge) and a (linear) unit of measure (such as meters, feet, or miles). The term origin may be somewhat misleading here, as the coordinates of the origin are not necessarily 0, 0. It may be easiest to imagine the origin as the point having coordinates (0, 0) -- and indeed, this is often the case -- but sometimes, the origin is considered to be a point with nonzero coordinates, in which case it is said to have a "false easting" and a "false northing" (essentially, offsets from some "other origin" whose coordinates are 0, 0). The important thing is where the point (0, 0) is with respect to the features on the map, and it is pretty much always at the lower left-hand corner, such that all x and y values are positive.

Some common map projections are summarized below:

Name of Projection Example Parameters Often Used For...
Albers Conic Equal-Area
  • Standard parallels: 29.5°N and 45.5°N
  • Central meridian: 90°W
maps of contiguous U.S.
Lambert Conformal Conic
  • Standard parallels: 37°N and 65°N
  • Central meridian: 96°W
maps of entire U.S.
Mercator
  • Standard parallel: 0° (equator)
  • Central meridian: 0° (prime meridian)
maps of entire world

Spatial Reference Systems

Taken together, a datum, a projection, and its parameters constitute what is called a mapping system, coordinate system, coordinate reference system (CRS), or spatial reference system (SRS). (These terms all essentially mean the same thing; this text uses the term spatial reference system.) It is considered a "best practice" to include this information on any published map.

A spatial reference system is often referred to by its Spatial Reference Identifier (SRID), an integer that uniquely identifies a spatial reference system. Several organizations have published SRIDs, most notably the European Petroleum Survey Group (EPSG) (now part of the International Association of Oil & Gas Producers). Most if not all SRIDs can be found online at Coordinate Systems Worldwide (EPSG.io).

Some common spatial reference systems are summarized below:

Name Description Datum Projection Parameters SRID(s)
Universal Transverse Mercator (UTM) Earth is divided into 60 zones, each 6° wide (30 different cylinder orientations). Each zone is split at equator into North (N) and South (S). WGS 841 Transverse Mercator
  • Central meridian: depends on zone
  • Origin (X): 500 km W of central meridian
  • Origin (Y): equator (N) or 10,000 km S of equator (S)
  • Unit of Measure: meter
32601 .. 32660, 32701 .. 327602
State Plane Coordinate System (SPCS) Each state (in the U.S.) is divided into zones, each of which has its own parameters. NAD 83 depends on zone; most use Lambert Conformal Conic
  • Standard parallels: depends on zone
  • Central meridian: depends on zone
  • Origin: depends on zone
  • Unit of Measure: meter or foot
102629 .. 102758
Texas State Mapping System (TSMS) NAD 83 Lambert Conformal Conic
  • Standard parallels: 27°25'N and 34°55'N
  • Central meridian: 100°W
  • Origin (X): 100°W (False Easting: 1,000 km)
  • Origin (Y): 31°10'N (False Northing: 1,000 km)
  • Unit of Measure: meter
3081
World Geodetic System 1984 (WGS 84)3 Used by most modern GPS devices. WGS 84 none / geographic4 (not applicable) 4326
Pseudo-Mercator (a.k.a. Web Mercator) Used by many web mapping applications, including Google Maps. WGS 84 Mercator
  • Standard parallel: 0° (equator)
  • Central meridian: 0° (prime meridian)
  • Unit of Measure: meter
3857
1 Historically, several datums have been used for UTM; WGS 84 is mostly used today.
2 These SRIDs apply to WGS 84.
3 Although usually used to describe a reference ellipsoid (or a datum based thereon), WGS 84 is often thought of as a SRS in its own right, which can be somewhat deceptive, mainly because of its "projection" (or lack thereof).
4 Strictly speaking, there is no projection associated with WGS 84. By default, it is said to be "unprojected," or sometimes described as having a "geographic coordinate system" (see also plate carrée).