I have been trying to solve this problem for quite some time, but can't find a good solution.

Given three sets of geographic coordinates how can I calculate the center point. By "center point" I mean the point on earth that is equidistant from the three points, on the same side of the earth. It would also be the circumcenter of a triangle formed by the three points.

This question is very similar to Calculate midpoint from a series of latitude and longitude coordinates, but that is dealing with a large number of points (of which all but three have been edited out) so the answers are either dealing with the centroid of a polygon (not what I'm looking for), are suggesting an average of the coordinates (not even close) or just don't answer at all. None of them are dealing with a circle.

I am dealing with circles that are no more than about 100 miles in radius. It doesn't need to be too ridiculously accurate, so an ellipsoid or even a spherical model would be plenty close enough. It would also work to transfer the coordinates to cartesian, solve the problem then transfer them back, but there is no easy way to do that given that the circle could be anywhere on earth. I'm not going to be working with areas anywhere near the poles, so that's not a consideration.

I am intending to use a spreadsheet to find this, but if there is some other resource that would be better I'm open to it.

Here are the things I'm finding online that are not helping:

People with the same problem keep being referred to the website geomidpoint.com. This site calculates your "personal center of gravity" from multiple points. I have no idea what it is calculating, but it is not the center of a circle with the points. In fact, more than three points are unlikely to be on the same circle.

There are plenty of math sites with solutions to this problem in cartesian coordinates, but that doesn't work with geographic coordinates.

There are a few places that are finding the geographic coordinates of the centroid of a triangle, but that is not the same as the circumcenter. The circumcenter of a triangle does not need to be inside the triangle.

There are a few questions over on different se sites that take a poke at it, but most math experts seem to have trouble applying it to geographic problems. That's why I'm posting here instead of on math.se.

This guy on a math forum seems to have a good, but complex method. He's using a spherical model, so I don't know how far off it would be. I tried to follow his method, but it doesn't work out. I'm not sure if his formulas are wrong or if I'm doing something wrong in translating it to spreadsheet format.

  • I came across this when looking at delaunay triangulation, I have it in C++, is that a language you can understand? It comes from the perpendicular bisectors of two sets of two points of the 3. – Michael Stimson Oct 29 '18 at 2:11
  • @MichaelStimson I'm not a programmer, so I don't know C++, or really much of anything. If I can pick the equations out of it I could do something with it. – Tom Oct 29 '18 at 15:01
  • 1
    Dr. Math's solution looks like it should work, it is an ingenious way to calculate it on the sphere. Are you using radians in your calculations? Most programs use radians for trigonometric functions, but lat/lon are usually expressed in degrees, so appropriate conversion needs to be done. – FSimardGIS Oct 29 '18 at 19:13
  • @FSimardGIS Yes, I converted to radians at the beginning, then back to degrees at the end. The result was way off. I'll go through it again tonight and see if I can find a mistake. – Tom Oct 29 '18 at 19:15
  • @FSimardGIS He also said to use ATAN2 but I couldn't quite figure out all the parameters, so I used ATAN. But that wouldn't affect the latitude, which was off, too. – Tom Oct 29 '18 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.