Measuring instead of naming
Open any atlas, any textbook, any cartography library’s documentation. The projections are described as conformal, or equal-area, or neither. The descriptions are almost always right, and they are almost never checked.
They do not have to be taken on trust. Both properties are statements about a quantity computable at every point, so testing them is a loop.
The whole method
A projection is a pair of functions taking longitude and latitude to and . Differentiate them and the four partials give the two principal scale factors, and , at any point.
Then:
- conformal means , so the maximum angular deformation is zero
- equal-area means , so the areal factor is one
Sample a few hundred points across the projection’s domain, compute both, and take the worst. If the projection claims conformality and the worst is not zero, the claim is false.
That is it. There is no subtlety and no cleverness, which raises the question of why it is not standard practice — and the answer seems to be that everyone assumes somebody else did it.
The tolerance is the hard part
The measurement is easy. Deciding what counts as zero is not, because the derivatives are numerical and numerical derivatives have noise.
The wrong way to handle that is to pick a tolerance that makes the tests pass. The right way is to measure the noise, measure the smallest real defect, and check that the tolerance sits between them with room on both sides.
For this site:
- The genuinely conformal projections — spherical Mercator, ellipsoidal Mercator, stereographic, Lambert conformal conic — measure between and degrees. That is the noise floor.
- The smallest genuine failure is Web Mercator at degrees.
- The tolerance is degrees: about sixty times above the noise, about four thousand times below the failure.
Both margins are asserted on every build. A tolerance loosened enough to certify Web Mercator as conformal would itself fail the check, which is the property that makes the number defensible rather than convenient.
The equal-area side is cleaner. Areal error is a determinant and does not involve subtracting two nearly equal quantities, so the equal-area projections measure between and — three orders of magnitude quieter than the angular measurements, for a structural reason worth understanding rather than a lucky one.
The assertions must reject
An assertion that has quietly stopped rejecting is worse than no assertion, because everything downstream is written as though it were working.
So the gate does not only require the conformal projections to pass. It requires:
- Web Mercator to fail the conformality test
- Mercator to fail the equal-area test
- Mollweide and Gall–Peters to fail the conformality test
- the equirectangular projection to fail both
If any of those started passing, something would be broken — and it would be broken silently, because every figure would still draw a perfectly plausible map.
Two routes to every number
Where a check can be done twice by independent means, it is.
The scale factors are computed by numerically differentiating the projection. For the four projections with simple closed forms — Mercator, equirectangular, sinusoidal, Lambert cylindrical — the analytic scale factors are also implemented, and the two must agree. They do, to better than .
That check caught a real error during construction. The sinusoidal projection’s meridian scale factor is , and the first version of the analytic formula was written with latitude where longitude belongs. The projection’s meridians fan out from the central one, so a point far to the east is stretched along the meridian regardless of its latitude — and writing that as a function of latitude alone gives a curve of the right general shape and the wrong values. The numerical route disagreed by 0.48, and nothing about any drawn map would have looked wrong.
What a measurement catches that a name does not
Three things, in increasing order of how much trouble they cause.
A projection whose description is wrong. Rare in published sources and not unknown, particularly for the less common projections where the description has been copied from somewhere without anyone re-deriving it.
A projection implemented wrongly. Common. A transcribed formula with a sign error or a swapped argument produces a map that looks like a map. Every projection here is required to round-trip — forward then inverse returning the starting coordinates — and the twenty-one currently do so to or better, but the Hammer projection’s inverse was wrong on the first attempt and only that check noticed.
A projection whose description is right about the sphere and wrong about the body being mapped. This is Web Mercator, it is the interesting case, and it is the one a name can never catch — because the name is accurate about the formula and the formula is being applied to the wrong thing.
The same discipline elsewhere
This method is not specific to projections, and the sibling sites in this collection apply the same idea to whatever their subject makes checkable — a chemistry site that computes the contour an orbital picture claims to enclose, a colour site that verifies two patches captioned identical really are.
The common shape is this: find the claim that every figure in the field makes and nobody verifies, then verify it. The claims worth attacking are the ones where a wrong answer looks exactly like a right one, because those are precisely the ones inspection cannot catch.
In cartography that claim is the projection’s own name.
What the round-trip test catches
The conformality and equal-area assertions test a projection’s claimed property. A third assertion tests something more basic, and it is the one that fails most often during development.
Forward then inverse must return the starting coordinates. All twenty-one projections here do, to or better.
The Hammer projection did not, on the first attempt. Its inverse had been transcribed from a reference with a scaling that did not match the forward formula this site uses, and the error was 1.55 radians — enormous, and completely invisible, because nothing on the site called the inverse for that projection at the time.
The fix was to derive the inverse rather than transcribe it. Hammer is exactly the Lambert azimuthal equal-area projection applied to half the longitude with the x coordinate doubled, so its inverse is Lambert’s inverse on half the x with the longitude doubled back. Written that way the relationship is visible and the scaling cannot be got wrong.
That is the general shape of the problem this site exists to address. The error was in a code path no figure exercised, in a projection whose forward map was correct, and it would have surfaced eventually as a wrong answer in some later essay with no indication of where it came from.
Sampling, and why worst-case
The audit takes the worst value over its sample points rather than the mean, and the choice matters.
Conformality is a statement about every point. A projection that is perfectly conformal over ninety per cent of its domain and badly wrong over the rest is not conformal, and an average would report it as nearly so.
The sampling is 24 longitudes by 17 latitudes, skipping points outside the projection’s valid domain — the poles for Mercator, the far hemisphere for the azimuthals. That is around four hundred points per projection, which is enough to find any region of failure large enough to matter and not enough to find a pathology confined to a single point.
That last limitation is real and worth stating. A projection with an isolated singularity between sample points would pass, and the site’s assertions would not catch it. What protects against that in practice is that projections are smooth almost everywhere and their failures are regional rather than pointlike.
What this does not check
Three things, and naming them is part of the discipline.
Whether the projection is the one it claims to be. The library’s Mercator could be some other conformal projection entirely and every assertion would pass. What guards against that is the round-trip test against published coordinates and the analytic scale-factor comparison, neither of which is a complete identification.
Whether the region of validity is right. A projection’s limit is declared rather than derived, and a wrong limit would exclude points that should be tested.
Whether the metric is right. Web Mercator’s whole defect only appears when measured against the ellipsoid; measured against a sphere it is perfectly conformal. Choosing the wrong metric would hide the very thing the site’s headline result depends on, and nothing in the machinery would notice.
That third one is the deepest limitation here. The assertions verify a projection against a stated model of the body being mapped, and if the model is wrong the verification is answering the wrong question correctly.
The errors this method found
Four, during the construction of this site, and all four were invisible in any drawn output.
The sinusoidal analytic scale factor was written as a function of latitude when it depends on longitude. Disagreement with the numerical route: 0.48.
The Hammer inverse was transcribed with a scaling that did not match the forward map. Round-trip error: 1.55 radians.
The rhumb-line generator interpolated latitude and longitude linearly, which produces a different curve entirely. It bowed on Mercator by nearly one per cent, and Mercator renders true rhumb lines exactly straight.
The spherical area formula summed longitude differences without wrapping them, so a ring encircling the globe cancelled to zero. A hemisphere came out with area zero.
Not one of those would have produced an obviously wrong picture. The first three would have produced slightly wrong numbers in captions, and the fourth would have produced a zero somewhere downstream that looked like a missing feature rather than a broken formula.
What a tolerance should be made of
The general principle, since it applies well beyond this subject.
A tolerance has two jobs: absorb the noise, and catch the defect. Both are measurable, so a tolerance is defensible when the measurements bracket it and indefensible when it was chosen to make a test pass.
Reporting the margins alongside the tolerance is what makes the difference visible. This site’s conformality tolerance sits sixty times above the noise floor and four thousand times below the smallest real failure, and both figures are asserted rather than stated — so a future change that narrowed either margin would fail the build rather than silently weakening the test.
What was computed here
The audit samples 24 longitudes by 17 latitudes across each projection’s valid domain, skipping points the projection cannot represent, and takes the worst case of each quantity rather than the mean. Worst case, because conformality is a statement about every point and an average would let a projection with one catastrophic region pass.
The derivatives use Richardson extrapolation over two step sizes, which cancels the leading error term. That was not enough on its own to move the noise floor much — the dominant error is roundoff rather than truncation at this step size — but it makes the floor stable across projections, which is what the tolerance argument needs.
The invariance check is the subtlest of the assertions. The principal scales, areal factor and angular deformation must not change when the projection’s output axes are swapped, while and exchange places. That is the cleanest demonstration available that the first group describes the map and the second describes the coordinates, and it comes out at exactly zero drift.
What the pictures cannot show
The audit plot’s axes span seventeen decades logarithmically, which is the only way to fit a noise floor of and a failure of into one figure. Logarithmic axes compress differences, so the visual distance between two points understates how different they are, and the numbers should be read rather than the gaps.
The measurement itself is also invisible. Nothing in any drawn map shows whether it was verified, which is the entire problem this essay is about — and the only remedy is for the caption to carry the number.
Who found it, and when
Tissot supplied the local analysis in 1859 and 1881, so the tools have existed for a century and a half.
What has changed is that the arithmetic is now free. Computing at five hundred points was a serious undertaking with a table of logarithms, and the pressure to derive properties analytically once and quote them thereafter was overwhelming. The analytical derivations are correct; the practice of quoting rather than checking outlived the constraint that justified it.
Modern geospatial libraries carry projection metadata — PROJ’s database records whether each is conformal or equal-area — as declared attributes rather than tested ones. The declaration is right in essentially every case, and Web Mercator is the exception that shows what the declaration cannot do.
Where this goes next
The tool underneath is Tissot’s indicatrix. The case this method found is Web Mercator is not conformal. And the theorem that says what the audit will always look like is the trade-off is two lines.