Geographical Center Problem

Given a list of locations, where is the central-most place amongst them? This question is harder than it appears. When I first worked at the problem, I averaged the latitudes and longitudes which works for a small region, but this simplistic solution has problems when you go global.

Here is an example: what is the average longitude of 175 degrees East and 175 degrees West? Numerically the average of 175 and -175 is zero, but the answer geographically is 180 degrees!



George Huxtable, a member of the Navigation Mailing List, had this to say about a possible solution to the problem, in a post dated 23 July 2001:

I have been pondering on what would be a meaningful way to define a centre
of gravity for individuals members scattered over the surface of a sphere.

Somehow, I doubt whether averaging latitudes and then separately averaging
longitudes provides the best answer. It should be possible to do the job
properly, for anyone with a bit of time on his hands. Here is a suggested
mechanical analogy.

Take a globe of the world, that will float. For example, I have a beachball
printed with the World on its surface, crudely marked with lat and long. If
you put it into a pool, it will float any way up, like most spheres.

Now glue on to its surface a set of identical coins or weights, one for
each member, in the spot where they live, and chuck it into the pool again.
Now, the lowest point of this globe represents in some way a centre of
concentration of the members.

It should be possible to devise a computer analogy to avoid having to do
the physical experiment. Would it produce the same answer as Dan Allen's
method? I wonder...

Just a thought,

George Huxtable.
George Huxtable, 1 Sandy Lane, Southmoor, Abingdon, Oxon OX13 5HX, UK.
Tel. 01865 820222 or (int.) +44 1865 820222.


My friend Dr. Paul Finlayson then came up with this theory behind the problem. He describes his analysis of the problem:

The floating world-globe with glued coins idea is clever.  The lat-lon of
the lowest point when the globe is thrown into the pool can be computed as

For each coin, compute the cartesian position x,y,z from:

         x = cos(lat)cos(lon)
         y = cos(lat)sin(lon)
         z = sin(lat)

Next, separately average the x, y, and z values to get xAv, yAv, zAv.  This
is the position of the center of mass of the coins.  The (lat, lon) of the
center of mass is computed from:

         lat = asin(zAv/r)  where r = sqrt(xAv^2 + yAv^2 + zAv^2)
         lon = atan2(yAv, xAv)

So, assuming my math and logic are correct, this is the lat and lon of the
lowest point of the globe when thrown back into the pool.


Given this analysis, I implemented a computation of this in JavaScript which runs on your computer as part of rendering this webpage. View the source code to this page to see the JavaScript code. North latitudes and West longitudes are positive.

Here is the current dataset and the results:

The center is in Canada, in northern Quebec, south of Hudson Bay:

  206.3 nmi  43° NE of Pickle Lake, Canada. (nearest airport)
  258.5 nmi 310° NW of Moosonee, Canada. (nearest seaport)
  263.0 nmi  16°  N of Katatota Island, Canada.

The weighted center moves southeast 109 nmi from the unweighted center:

  159.5 nmi 297° NW of Moosonee, Canada. (nearest seaport)
  156.9 nmi  31° NE of NAKINA, CA. (nearest airport)
  216.6 nmi  40° NE of Katatota Island, Canada.

Back to Dan's Home Page

Created:  26 Dec 2000  
Modified: 18 Jan 2004