The Earth Isn't Flat

Eight Falsehoods Programmers Believe About Map Coordinates

Mercator projection SW (Map image by Daniel R. Strebe, licensed under CC BY-SA 3.0)

1. The only projection that is important is Web Mercator

While Web Mercator is probably the most popular projection that most people will run into, the Albers and Lambert equal-area projections are fairly common for when the projection needs to maintain the area rather than the navigational direction (which is one of the main features of the Mercator projection).

2. All coordinates are latitude/longitude pairs

In addition to latitude/longitude coordinates, Universal Transverse Mercator (UTM) coordinates are also fairly common. UTM splits the Earth into 60 zones, and then further specifies northings and eastings in metres (as opposed to degrees, minutes and seconds).

The UTM notably omits the polar areas - which are covered by the Universal Polar Stereographic (UPS) coordinate system instead.

3. Latitude always comes before longitude in a coordinate pair

While it is common to see items in (latitude,longitude) order, some formats (e.g. GeoJSON) dictate that coordinates follow (longitude,latitude) order instead. This matches the typical way coordinates are specified in a Cartesian coordinate system: (x,y).

4. A degree of latitude or longitude always represents the same distance

In the Mercator projection, the Earth - which, in reality, is an oblate spheroid - is projected as a simple cylinder. This means that "parallel" longitude lines meet at the poles, so the distance between degrees of longitude are much shorter as they get closer to the poles than they are at the equator (~111 km).

The variance in latitude is not as large - but it still varies by about 1km going from the equator to the poles.

5. The shortest path between two points is a straight line

The Earth isn't flat - as such, although your map may be projected to be flat, the distance between two points needs to follow the curvature of the Earth and can usually be approximated by the Haversine formula.

6. Coordinates for a given landmark are always fixed

Movements of the Earth's tectonic plates mean that the land masses are moving slowly with the passage of time. For example, Australia has shifted about 1.8 metres from where it was in 1994 (about 7 centimetres per year). This also means that geocentric datums have to be updated to account for these changes every once in a while.

7. Given a pair of coordinates, you can plot it on a map

In addition to coordinates, we also need to know the datum, which is the coordinate system and its specific set of reference points on the Earth. While most coordinates often follow the WGS84 datum, care should be taken to ensure that the map and the coordinates plotted are using the same datum.

8. There is one global ellipsoid to base coordinates on

Most modern datums are based on the WGS84 ellipsoid as the surveys are often completed using GPS as a reference, but notably Russia and China still base their local datums on different reference ellipsoids.

As a result, conversions to and from datums based on different ellipsoids may result in inaccuracies and deviations and may be of concern if you have to deal with GPS, GLONASS, and BeiDou data at the same time.