For calculating areas of polygons by means of projecting to a cylindrical equal area projection I came across the following discrepancy:

I ended up with a different distance, off by more than 5km, from the equator to a pole (the half length of any meridian) for the WGS84 ellipsoid than given elsewhere.

Please check the example javascript calculation here:


The WGS84 ellipsoid definition (pdf) (Chapter III) doesn't specify this.

Is the integrated solution of 10007.559km more precise?


  • I'm referring to the exact circumference of the ellipse intersecting the WGS84-Ellipsoid at the two poles and the equator where a (semi-major axis) and b (semi-minor axis) are defined by the WGS84-ellipsoid definition

  • The distance of pole to equator is a quarter of that circumference (blue line in sketch).

I'm aware that the original meter definition of it was a 10 000th of this distance.

enter image description here

3 Answers 3


The answer is ~10001.966km (see Wolfram and sigurdhu)

The fixed JavaScript Implementation gives me 10001.959km. Close enough.

JavaScript was introducing errors at a precision bigger than 16 digits at Math.pow(0.5, digits)

  • 1
    Cross-checked with Esri's geodesic distance method: 10001965.7 m.
    – mkennedy
    Sep 19, 2013 at 16:29

The python code for EllipseCircumference given on wikipedia is right. Your translation into Javascript, however, is wrong. The python statement

x, y = 0.5 * (x + y), math.sqrt(x * y)

does the assignments in parallel and so it is not equivalent to

x = 0.5 * (x + y); y = math.sqrt(x * y)

but to

t = x; x = 0.5 * (t + y); y = math.sqrt(t * y)

Make this change to Javascript and you'll get the correct value for the meridian distance.

  • thanks I fixed it in the codepen, im still pretty green about python
    – mxfh
    Sep 26, 2013 at 20:04

Even though I cannot help as to which is more precise and why, I can say that the definition of a meter states that it is "one ten-millionth of the quarter of a meridian", a meridian being considered a circle at that time, it would now be "one ten-millionth of the half of a meridian", which happens to be the length from the equator to a pole. This mean that there should be exactly 10 000 km.

  • 2
    That's a historical definition, the current one is "The metre is the length of the path travelled by light in vacuum during a time interval of 1/299792458 of a second." (Source: BIPM)
    – Jake
    Sep 19, 2013 at 15:31
  • Indeed... I looked at the data though, and the distance between the pole and any point on the equator is roughly 10002 km, which indicates that the "Distance calculated by Simple Elliptic Circumference Calculation" is correct. As I stated before though, I can't say why...
    – Saryk
    Sep 19, 2013 at 15:44
  • What data did you look at? It seems likely that you get the same result simply because the same method was used for calculating the distance, but that doesn't really answer mxth's question.
    – Jake
    Sep 19, 2013 at 15:49
  • Looked at the ratio between 1791 meter and 1983 meter, which is approximately 1.0002. This means that 1 (1791)m = 1.0002 (1983)m
    – Saryk
    Sep 19, 2013 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.