What a machine does with it

Computing an area needs a surface

A shoelace over a ring of coordinates returns a number whatever the coordinates are. For one twenty-by-ten-degree cell it returns 1.75 times the true area in degrees, 3.06 in a conformal plane, and exactly the closed form in an equal-area one — and the closed form itself is 0.45 per cent out, because the sphere is a model too.

The shoelace formula takes a ring of coordinates and returns a number. It does not ask what the coordinates are, and it cannot: the arithmetic is the same whether the pairs are metres, degrees, pixels or nothing at all.

That is why an area is the operation in this field with the widest spread between right and wrong answers. For one cell of the graticule the plausible methods differ by a factor of three.

The area of one 20° × 10° cell at 50–60° north, seven ways. The cell has an exact area — R²Δλ(sin φ₂ − sin φ₁), 1,416,580 square kilometres — so every other row is a measurement of the method rather than of the ground. The equal-area projection returns it to 1.000000 and the spherical polygon formula to 1.000000, which is three routes agreeing — and the same cell integrated on the ELLIPSOID comes out 0.45 per cent away from all three, because the sphere is a model. Taking the shoelace in Mercator gives 3.06 times too much, and treating degrees as a length gives 1.75 times — about sec φ at the cell's middle, which is where that error comes from.
Fig. 1 One twenty-by-ten-degree cell at 50–60° north, its area computed six ways. Three of them agree exactly — the closed form, the spherical polygon formula and the shoelace in an equal-area projection — the ellipsoid’s own integral disagrees with all three by 0.45 per cent, and the two remaining methods are out by factors of 1.75 and 3.06.

The truth, and why it needs no dataset

A latitude–longitude cell has an exact area on a sphere:

A=R2Δλ(sinφ2sinφ1)A = R^2\,\Delta\lambda\,(\sin\varphi_2 - \sin\varphi_1)

For the cell from 50° to 60° north and 10° west to 10° east that is 1,416,580 square kilometres, and the number has no error bar, no simplification level and no vendor.

This is the choice the projection that shows true size records as the site’s founding methodological decision: a coastline would have been more evocative and would have made every measurement partly a measurement of the coastline’s generalisation. A cell is exact and it is enough, because the mechanism being measured is the projection’s and not the shape’s.

Three routes, and why three

The closed form is one route. Two others reach the same answer by different arithmetic, and both are computed rather than assumed:

The spherical polygon formula, which sums Δλ(2+sinφ1+sinφ2)\Delta\lambda\,(2 + \sin\varphi_1 + \sin\varphi_2) around the ring and needs no knowledge that the ring is a cell. It returns 1,416,580 — agreeing to the sixth decimal place.

The shoelace in an equal-area projection, which is planar arithmetic on projected coordinates and knows nothing about spheres at all. It returns the same number, to 1.0000000000000007 of a ratio.

Three routes agreeing is the only reason to believe any of them, and it is the pattern this site has used since the curvature was computed two ways at foundation. The agreement also does double duty: it validates the projection’s implementation and the area machinery simultaneously, since a bug in either would break the match.

The two that are wrong, and by how much

In a conformal plane the shoelace gives 3.0633 times the truth, because Mercator’s areal scale factor is sec2φ\sec^2\varphi and the cell sits at a mean latitude of about 55°. Not an error in the arithmetic — the polygon really does occupy that much of the projected plane.

In degrees it gives 1.7457 times, taking the shoelace in degrees and multiplying by the square of a degree’s length. That factor is roughly the secant of the cell’s middle latitude, and it is exactly what the equirectangular projection gives, since the equirectangular is the degrees.

The dependence on latitude is the part worth carrying:

cell truth in degrees in a conformal plane
0°–10° 2,460,334 km² 1.005× 1.010×
50°–60° 1,416,580 km² 1.746× 3.063×
70°–80° 639,214 km² 3.869× 15.534×

On the equator both wrong methods are right to one per cent, which is precisely why they survive: anybody testing an area routine on tropical data will find it correct.

The area of one 20° × 10° cell at 70–80° north, seven ways. The cell has an exact area — R²Δλ(sin φ₂ − sin φ₁), 639,214 square kilometres — so every other row is a measurement of the method rather than of the ground. The equal-area projection returns it to 1.000000 and the spherical polygon formula to 1.000000, which is three routes agreeing — and the same cell integrated on the ELLIPSOID comes out 0.80 per cent away from all three, because the sphere is a model. Taking the shoelace in Mercator gives 15.53 times too much, and treating degrees as a length gives 3.87 times — about sec φ at the cell's middle, which is where that error comes from.
Fig. 2 The same six methods on a polar cell. The conformal plane now returns fifteen and a half times the true area, and the two equal-area projections still return it exactly — one cylindrical and one azimuthal, which is worth having in the same picture because it shows that the property rather than the family is doing the work.

The sphere is a model too

Every number so far treats the Earth as a sphere. The coordinates it was given are geodetic latitudes on an ellipsoid, and the two are not the same body.

The ellipsoid’s area element is M(φ)N(φ)cosφM(\varphi)N(\varphi)\cos\varphi, which has no antiderivative worth writing, so it is integrated. Over the whole globe that gives 510,065,622 square kilometres, which is the published surface area of WGS84 to the last digit anybody publishes — computed here from aa and ff alone rather than quoted, which is the site’s rule applied to its own reference value.

Over the individual cells it gives:

cell on a sphere on the ellipsoid sphere’s error
0°–10° 2,460,334 km² 2,449,665 km² +0.436%
50°–60° 1,416,580 km² 1,422,922 km² −0.446%
70°–80° 639,214 km² 644,320 km² −0.793%

The totals agree to five parts in ten million and the cells disagree by up to eight parts in a thousand. A sphere of the mean radius has the right amount of area and distributes it wrongly: too much at the equator, too little towards the poles, with the crossover in the mid-latitudes. That is the signature of a redistribution rather than a scaling, and the assertion demands both signs be present, which fails if the comparison has collapsed into a constant factor.

Eight parts in a thousand is larger than most people expect of “the spherical approximation”, and it is two orders of magnitude larger than the totals suggest. It is also the reason a serious area calculation uses the authalic latitude — the one that maps the ellipsoid to a sphere of equal area, which is one of the six auxiliary latitudes geodetic against geocentric latitude sets out and which exists for exactly this purpose.

Where the sphere’s error changes sign

The three cells’ errors run +0.436, −0.446 and −0.793 per cent, so somewhere between ten and fifty degrees the sphere of mean radius gets a cell exactly right. That latitude has a closed form and it is one this collection has already met under another name.

The sphere’s area element is R²cos φ and the ellipsoid’s is MN cos φ, so the two agree exactly where MN = R² — that is, where the Gaussian radius of curvature equals the mean radius. Solving with WGS84’s constants and the conventional mean radius of 6,371.0088 kilometres puts it at

sin2φ=1e2(1a1e2R),φ=35.32°.\sin^2\varphi = \frac{1}{e^2}\left(1 - \frac{a\sqrt{1-e^2}}{R}\right), \qquad \varphi = 35.32°.

Below that latitude a spherical calculation over-states a cell’s area and above it under-states one, and the two errors cancel over the whole globe — which is why the totals agree to five parts in ten million while the cells disagree by eight in a thousand. The mean radius is defined so that the sphere holds the right amount of area, and 35.32° is where it holds it in the right place.

Two things follow that the three-row table does not show.

The sign of the error is predictable from the latitude alone, so a spherical area calculation over a tropical dataset is systematically high and over a temperate one systematically low, and a study comparing land areas between two hemispheres inherits the difference rather than a common factor. That is worse than a uniform bias, which would cancel in a ratio.

And the crossing is not a property of the Earth. It is a property of the mean radius, which is a convention — (2a + b)/3 is one choice among several, and a different mean puts the crossing somewhere else. The same number appears in a datum is fitted to a region as the latitude at which a local curvature fit buys nothing, and it is the same quantity for the same reason: both ask where the sphere of the conventional radius happens to be right.

So a reader who wants to know whether a spherical area is too large or too small for their region can answer it without computing anything, and the answer is one comparison against 35.32° of latitude.

What the ranking of errors says about the operation

Set the sizes side by side and the ordering is not the intuitive one:

method error on the 50°–60° cell
shoelace in a conformal plane 206%
shoelace in degrees 75%
spherical closed form 0.45%
shoelace in an equal-area plane 0.45%
the ellipsoid’s own integral

The two exact-on-a-sphere methods carry the sphere’s own error and nothing else, so they are equal at 0.45 per cent — a floor set by the model rather than by the method. Below that floor there is only the ellipsoid.

That is the useful structure of the problem. Two decisions, taken in order: which surface, then which plane. Getting the second right and the first wrong caps the accuracy at half a per cent; getting the first right and the second wrong is out by a factor of three. Almost every discussion of area in a spatial context is about the second decision alone.

Where the two wrong methods agree, and why that is worse

The degrees method and the conformal-plane method are wrong by different amounts almost everywhere, and they agree at the equator, where both are right to one per cent. Between those two facts sits the reason the mistake persists in production code for years.

A routine tested on tropical data is correct. The same routine over Britain is out by 75 or 206 per cent, and there is nothing in the output to say which regime it is in — the numbers are the right order of magnitude for a country, positive, and stable under repetition. The failure is not detectable by inspection of the answer; it is only detectable by knowing what the answer should be, which is the thing the routine was written to find out.

That is the strongest general argument in this field for computing on the surface: not that the plane is inaccurate, but that the plane’s error is a smooth function of latitude with no discontinuity to notice. A method that failed loudly at 50° north would have been fixed. One that drifts from 1.01 to 3.06 as the data moves north is indistinguishable, at every individual point, from a correct method applied to different ground.

The error is a field rather than a table. The areal scale factor of the two equal-area candidates is flat at one and the other two climb smoothly with latitude — smoothly being the operative word, since a jump would be noticed and a gradient is not.

Why the wrong answers are so easy to get

Because the operation has no way to refuse. A planar area routine handed geographic coordinates cannot detect the mistake: the numbers are in range, the ring closes, the result is positive and finite. A units error would be caught by dimensional analysis if anything were checking dimensions, and nothing is — degrees enter and square degrees leave, and the multiplication by 111 kilometres squared happens somewhere else, by hand.

The same shape as a coordinate without its system is not a location, and with the same conclusion: what protects a calculation is not care but a second route. Compute the area two ways and the disagreement is the alarm; compute it once and any answer looks like an answer.

The equal-area shoelace is exact only if the edges are

The claim that an equal-area projection makes the shoelace exact needs one condition, and measuring where it holds is more informative than stating it.

A shoelace joins consecutive vertices with straight lines in the plane. A cell’s edges are meridians and parallels, which project to straight lines on a cylindrical projection and to curves on almost everything else. So the exactness above is partly a property of the cell and the cylinder rather than of equal-area alone.

Measured on the same cell, as the ring is densified from four corners to 260 points:

ring Gall–Peters Lambert azimuthal Mollweide
8 points 1.000000 0.993603 0.995829
20 points 1.000000 0.999600 0.999739
68 points 1.000000 0.999975 0.999984
260 points 1.000000 0.999998 0.999999

The cylindrical member is exact at four corners and stays exact; the two curved-graticule members start 0.4 to 0.6 per cent low and converge as the square of the step, which is the signature of a chord approximating an arc. All three are equal-area; only one of them is exact from an undensified ring.

That is the third decision hiding inside compute the area of this polygon: what the edges mean between the vertices. A ring of four corners is not a rectangle on the Earth, it is four points, and every method has to assume something about what joins them.

The split in the table has one more cause worth naming. On the cylindrical member a cell’s edges are straight lines, so a four-point ring is the cell exactly; on the azimuthal and the pseudocylindrical they are curves, and a coarse ring cuts corners and returns a smaller area. The ground is the same in every case; the polygon standing in for it is not.

What a program should be asked

The operation area of this polygon is underspecified, and the four things it needs are worth writing out because each has appeared already in this field:

Which surface — the sphere, the ellipsoid, or the plane the coordinates are in. Half a per cent between the first two, factors between those and the third.

Which plane, if a plane — equal-area or nothing. There is no partial credit here: a projection is either equal-area, in which case the shoelace is exact, or it is not, in which case the error is the areal factor integrated over the polygon.

Whether the edges are straight in that plane or on the surface. A ring’s edges are curves on the sphere and straight lines in the plane, and the two enclose different regions — the difference is second order in the segment length and is the subject of a straight segment is a claim about a plane. The figures here densify their rings to 64 points per side so the effect is below the other terms.

And whether the ring crosses the seam, because a shoelace over unwrapped longitudes returns the complement — a factor of seventeen on the cell the antimeridian is a cut in the numbers measures.

The choropleth’s problem is that fact drawn: cells of equal ground area on a conformal plane, with the polar ones fifteen times the size of the equatorial ones. A density computed from areas measured off such a picture inherits every one of those factors.

The choropleth, which is this essay’s practical form

A thematic map shading regions by a density divides a count by an area, so it inherits everything above. If the areas come from a shoelace in the display projection, a conformal map makes high-latitude regions look three times too large and their densities three times too small, which is a gradient perfectly aligned with latitude and indistinguishable in the output from a real north–south trend.

This is where the Mercator-and-Peters argument acquires an operational edge, and it is a sharper point than the usual one. Mercator against Peters is about what a reader infers from the sizes of shapes; this is about what a program computes from them, and the program’s error is exact, reproducible, and passed downstream as a number rather than as an impression.

The repair is the one this whole essay points at: compute the area on the surface, once, and store it as an attribute. Then the display projection is free — it can be chosen for shape, for the region, or for the reader — because nothing is being measured off the picture.

The cells add up, which is the last control

One more check is available and it is the cheapest of all: the parts must sum to the whole.

Integrating the ellipsoid’s area element over the globe gives 510,065,622 square kilometres. Summing the same integral over cells — any partition of the graticule, at any resolution — gives the same number, because the integral is additive and the quadrature is midpoint. That is not a deep result and it is a strong test: a sign error, a missing cosine or a wrong radius survives a single-cell check and fails a whole-sphere one, because the individual cell has no known value to be compared against and the sphere does.

The site’s gate therefore checks the total rather than the cell, and lets the cells inherit the credibility. That is the same structure as the flux check on the other side of the collection — where the flux of normal gravity out of the ellipsoid is required to equal 4πGM2ω2V4\pi GM - 2\omega^2 V, and the residual required to fall by four when the sample count doubles — and the same reasoning: the quantity with a known answer is the one worth asserting on.

four planes a dataset might be stored in, scored on three operations. Each candidate measured over -10° to 30° east and 35° to 60° north: the worst areal error, the worst angular deformation, and the spread of the scale factor, which are what an area query, a shape and a distance respectively depend on. The best plane for areas is Gall–Peters, for shapes Web Mercator, and for distances Lambert azimuthal equal-area — three different answers, and no fourth candidate would collapse them, because a projection exact in two of these columns has a = b = 1 everywhere and is the isometry Gauss's theorem forbids. area of a polygon costs 3.06× too large in the wrong plane; drawing a line between two points costs 194 km from the ground it claims.
Fig. 3 Where the area question sits among the others a stored plane decides. Four candidates scored over one region on the worst areal error, the worst angular deformation and the spread of the scale factor: the best plane for areas is the equal-area one, for shapes the conformal one, and for distances neither — three different answers from one table, which is why “which projection should this file be in” has no answer until the operation is named.
Five identical cells on Gall–Peters. Five patches, each 20° of longitude by 10° of latitude. On the sphere the higher ones are genuinely smaller, because the meridians converge. On Gall–Peters the cell at 70° comes out 1.0 times larger than the equatorial one relative to its true size.
Fig. 4 The partition itself, drawn on a projection that preserves what is being summed. Every cell here has the area its own closed form gives, the sum over the globe is the ellipsoid’s published surface area, and the picture is what an equal-area projection is for — the shapes are wrong and the arithmetic is right.

Length is the same problem with a smaller spread

Area is the operation with the widest spread; length has the same structure and behaves better, which is worth a paragraph so the two are not conflated.

A length computed in a projected plane is out by the scale factor integrated along the line, which is a first-order quantity — the scale factor of a line integrates it rather than sampling the endpoints, and finds 18 millimetres on a 556-kilometre north–south line and 97 metres on a shorter east–west one. Area carries the same factor squared, which is why the errors here are factors and the errors there are parts per million.

The other difference is that no projection makes lengths right everywhere. Equal-area exists; equidistant-everywhere does not, because it would be the isometry no map is faithful rules out. So the clean advice available for area — use an equal-area plane and the shoelace is exact — has no counterpart for length, and a length is either computed on the surface or approximated.

It also says which repair is worth making. Replacing the sphere by the ellipsoid removes the whole eight parts in a thousand; replacing the mean radius by a locally fitted one removes most of it over a band and none of it elsewhere, and buys nothing at all near 35.32° where there was nothing to remove. The choice of radius is a one-parameter fix to a two-parameter problem, and it is exactly as good as the region is narrow in latitude.

Where this ladder goes

Area was the operation with the largest spread between methods. The next is the one with the largest spread between what is drawn and what is claimed: a straight segment between two stored points, which is straight in the plane it was stored in and 718 kilometres from its own route on the ground.

Named alongside this one

Essays reaching for the same objects. Nobody chose these; they are what the concept index makes visible.

What links here

The 8 essays that link to this one and share the most of its objects, of 37 that link here.

The objects this essay names

Each one links to every other essay that touches it.

Areal scaleAuthalic latitudeClosed formConformalityConventionEllipsoidEqual-areaNumerical integrationShoelaceToleranceVerification