Measuring distortion

A slope is not a shape

Every map in this collection has carried geometry. An applied map far more often carries a field — elevation, pressure, a density — and the first thing anybody does with one is differentiate it. A gradient is a covector, it transforms by the inverse transpose of the Jacobian, and the ellipse that governs it is the indicatrix turned inside out.

Everything this collection has put on a map so far has been geometry. A point, an outline, a route, a cell, a network of stations: objects with positions, whose distortion is described by what happens to a small circle drawn around a point. That is Tissot’s indicatrix, and it is a statement about vectors — about displacements, and what the projection does to them.

An applied map is far more often a picture of a field: a number attached to every point. Elevation, air pressure, temperature, population density, a geoid undulation, signal strength, rainfall. And the first thing anybody does with such a map is differentiate it — read a slope off the contour spacing, take a bearing of steepest descent, compute an aspect for a hillshade, quote a pressure gradient.

The derivative of a field is not a vector. It is a covector: an object that eats a displacement and returns a change in the value. And a covector does not transform by the Jacobian.

Tissot's ellipse and the one that governs gradients, at 20°E 48°N. The solid ellipse is the image of a small circle — Tissot's indicatrix, semi-axes a and b. The dashed one is the image of a unit gradient, whose semi-axes are 1/b and 1/a because a gradient transforms by the inverse transpose of the Jacobian rather than by the Jacobian. Its long axis therefore lies where the indicatrix's short one does. On Mercator both are circles, so a gradient's direction survives; on Lambert cylindrical the two ellipses are the same shape turned through a right angle, so the worst direction for a gradient is the best direction for a shape.
Fig. 1 Two ellipses at one point. The solid one is Tissot’s indicatrix, the image of a small circle, with semi-axes a and b. The dashed one is the image of a unit gradient, and its semi-axes are 1/b and 1/a — the same two numbers, inverted, and along the perpendicular directions. On the conformal panel both are circles. On the equal-area panel the two ellipses are congruent and turned through a right angle, so the direction that a shape is stretched most in is the direction a gradient is stretched least in.

The transpose, in one line

Write A for the linear map that takes a small ground displacement at a point to the page displacement it becomes. That is the matrix Tissot’s indicatrix is the image of the unit circle under, and this site computes it everywhere as the Jacobian of the forward map.

A field f has a gradient g on the ground, defined by the statement that a small displacement d changes the value by gᵀd. The same displacement on the page is A d. So whatever the page gradient G is, it must satisfy

GT(Ad)=gTdfor every d,G^{\mathsf T}(A\,d) = g^{\mathsf T} d \quad\text{for every } d,

which forces G = A⁻ᵀ g. Not A g. The inverse, and the transpose.

Now take the singular value decomposition A = U Σ Vᵀ with Σ = diag(a, b), which is exactly the decomposition that produces the two principal scale factors. Then

AT=UΣ1VT,A^{-\mathsf T} = U\,\Sigma^{-1}V^{\mathsf T},

so the ellipse governing gradients has semi-axes 1/a and 1/b along the same page directions U. Its long axis is 1/b, and 1/b sits along the direction that was the indicatrix’s short axis. The gradient ellipse is the indicatrix turned inside out.

Two consequences follow, and they are the whole of this rung.

A conformal map has a = b, so A is a similarity and so is A⁻ᵀ. The direction of a gradient survives exactly; only its magnitude is wrong, by the point scale factor.

An equal-area map has ab = 1, so (1/a, 1/b) = (b, a). The gradient ellipse has the same two semi-axes as the indicatrix and they are attached to the perpendicular directions: the same shape, rotated by ninety degrees.

At 20°E 48°N the Lambert cylindrical equal-area projection has a = 1.4945 and b = 0.6691, and its gradient ellipse has semi-axes 1.4945 and 0.6691. Mercator at the same point has a = b = 1.4945 and a gradient ellipse that is a circle of radius 0.6691 — which is cos 48°, and is the reciprocal of the scale factor.

What the direction error looks like on a map

The bearing of steepest ascent on Lambert cylindrical, true and as read. At each point the solid arrow is the true bearing of steepest ascent of a harmonic sum with a summit and a basin in the northern mid-latitudes, and the dashed one is the bearing a reader takes off the page by measuring against the projected meridian. They differ by up to 36.7° over 45 points. Both arrows are drawn the same length: the direction is the subject here and the magnitude is a separate error.
Fig. 2 At each sampled point, the true bearing of steepest ascent drawn solid and the bearing a reader takes off the page drawn dashed. Both are drawn the same length, because the magnitude is a separate error. The two separate by up to 52 degrees, and the pattern is not random: the error vanishes wherever the gradient happens to run along one of the indicatrix’s principal axes.

The field being differentiated here is analytic and stated: a sum of low-degree solid harmonics restricted to the sphere, whose surface gradient is the tangential part of an exact polynomial gradient. Nothing is sampled, nothing is interpolated, and no digital elevation model is anywhere near this measurement — for the same reason that the generalisation work uses curves built from a rule rather than a coastline. A real elevation model has a resampling error, a sampling interval and a vendor, and a measurement made on one would be partly a measurement of those.

The same experiment on a conformal projection produces one arrow at every point, because the two coincide to the last several digits.

The bearing of steepest ascent on Mercator, true and as read. At each point the solid arrow is the true bearing of steepest ascent of a harmonic sum with a summit and a basin in the northern mid-latitudes, and the dashed one is the bearing a reader takes off the page by measuring against the projected meridian. They differ by up to nothing measurable over 45 points. Both arrows are drawn the same length: the direction is the subject here and the magnitude is a separate error.
Fig. 3 The same field and the same sample points on Mercator. Every pair of arrows is one arrow: the worst separation over the whole grid is 3.6 × 10⁻¹⁰ degrees, which is the noise floor of the numerical derivatives rather than a property of the map. This is not an approximation that happens to be good. A conformal map’s Jacobian is a similarity, a similarity’s inverse transpose is a similarity, and a similarity does not turn anything.

The error, measured over a population of projections

The bearing error each projection imposes on a field's gradient. The median over a grid of sample points of the angle between the true bearing of steepest ascent and the bearing read off the page. The three conformal projections return zero to the arithmetic's own noise, because a conformal map's Jacobian is a similarity and a similarity is its own inverse transpose up to a scalar. Every other projection returns a real angle, the worst of them 69° at its worst point.
Fig. 4 The median bearing error over a grid of sample points, projection by projection. The three conformal members return zero to the arithmetic’s own noise. Every other projection returns a real angle, and the worst of them turns a gradient by 66 degrees at its worst point.

The separation in that chart is total. There is no projection with a small non-zero error: a map either has a = b everywhere, in which case its gradient error is at the tenth decimal place, or it does not, in which case the error is degrees.

That is a sharper split than the one the same population shows for shapes. The two ways a map is wrong are continuous quantities and every projection sits somewhere along both. Direction of a gradient is not continuous in that way, because the quantity that governs it is a/b and conformality is the statement that a/b is exactly one.

The worst-case numbers are worth quoting against something. Over a grid spanning 78 degrees of latitude, the Lambert cylindrical equal-area projection has a median bearing error of 9.05° and a worst of 66.5°. A hillshade computed on that page lights the ground from a direction that is wrong by nine degrees in the middle of the distribution — which is a visible thing, and it is not an artefact of the algorithm or the raster. It is what the projection did to the derivative.

Why the split is total rather than gradual

It is worth dwelling on why the ranking chart has no middle. Every other distortion measure on this site is a continuum: the Robinson projection sits between Mercator and the Lambert cylindrical on angular deformation, and there is a whole one-parameter family of maps between any two of them. Bearing error does not behave that way, because the quantity that governs it is the ratio a/b and not either factor.

Write the axis ratio as 1 + ε. A gradient at page angle ψ to the major axis comes back at arctan((1 + ε) tan ψ), so the largest turning over all directions is about ε/2 radians for small ε. A map with a one per cent axis ratio therefore turns some gradients by about a third of a degree, which is small; a map with a two-to-one axis ratio turns them by nineteen degrees, which is not. And a conformal map has ε = 0 identically, not approximately, because conformality is defined as that statement.

So a projection either belongs to the family whose Jacobian is a similarity everywhere, or it does not, and the boundary between the two is not a small number — it is an equation. That is the same reason Web Mercator’s failure of conformality is a measurable defect at 0.3848° while genuinely conformal projections sit at 1.6 × 10⁻⁶°: an exact condition either holds or it is violated by something, and the something is what gets measured.

The bearing error is half the angular deformation, and that is already published

The relation between the axis ratio and the turning can be closed, and closing it means every number in the ranking chart is available from a table this collection already prints.

A linear map with principal scales a and b turns a direction by at most the angle whose sine is (ab)/(a + b). That same expression is half of the maximum angular deformation ω, which is defined on this site as 2 arcsin((ab)/(a + b)) and is reported for every projection in the library. So

worst bearing error at a point  =  ω2,\text{worst bearing error at a point} \;=\; \frac{\omega}{2},

exactly, at every point of every projection, with no measurement needed beyond the one already made.

Against the figures this rung reports: the Lambert cylindrical’s worst bearing error of 66.5° corresponds to an ω of 133°, and its median of 9.05° to an ω of 18.1° — both of which are that projection’s own deformations over the band sampled. And the small-ε expansion the section above gives, ε/2 radians for an axis ratio of 1 + ε, is the same formula linearised: an axis ratio of two gives arcsin(1/3) = 19.47°, which is the nineteen degrees quoted.

So the gradient’s directional error is not a new quantity. It is the oldest quantity in the subject, halved. A cartographer who has looked up a projection’s angular deformation over a region has already looked up how far it will turn a slope, a hillshade’s lighting, an aspect raster and every steepest-descent trajectory drawn on it.

That is worth stating because it changes the practical form of the advice. Use a conformal projection for derivatives is the correct rule and it is unhelpful where a conformal projection is unavailable — inside a pipeline that has already chosen its plane, say. The halved-ω rule is what a practitioner in that position needs: it converts a published property of their map into a bound on the error in the operation they are performing, and it says whether the operation is worth performing at all. An ω of one degree bounds the bearing error at half a degree and nothing needs to change; an ω of forty bounds it at twenty and a hillshade computed there is lit from the wrong side of the hill.

The magnitude is a separate error, and it is exact

The slope a map reports, against the slope on the ground. A reader converts page distance to ground distance with the map's stated scale, so the slope they compute is the true one divided by the point scale factor. On Mercator that is exactly cos φ — the dashed line — so every slope reads half its true value at 60° and a sixth at 80°. The other curves are the same measurement on Lambert cylindrical and Mollweide. Nothing here is about the direction of the slope, which is a separate error.
Fig. 5 The slope a reader computes, as a fraction of the true slope, up a meridian. A reader converts page distance to ground distance with the map’s stated scale and has no other option, so what they get is the true gradient divided by the point scale factor. On Mercator that is exactly cos φ — the dashed curve — so every slope on a Mercator sheet reads exactly half its true value at 60° and a sixth of it at 80°.

The closed form is worth stating because it is so simple and so rarely said. On a conformal projection with point scale factor k, the read slope is the true slope divided by k. Mercator has k = sec φ, so

slope read off the sheet=cosφ×the true slope.\text{slope read off the sheet} = \cos\varphi \times \text{the true slope}.

Measured against that expression at ten latitudes, the worst relative departure is under 10⁻⁹, which is the difference between a closed form and a numerically differentiated one rather than a disagreement.

It is not the areal factor. The areal factor of Mercator at 60° is 4, and a reader who divided by that would be wrong by a factor of two in the other direction. The quantity that governs a gradient’s magnitude is the linear scale, once, because a gradient is a rate and not an amount.

On an equal-area map there is no such closed form, because there is no single scale factor. The Lambert cylindrical curve in the figure runs from 1.000 at the equator down to 0.643 at 50° and back up past 1 to 3.19 at 80°, because the meridian is being compressed while the parallel is stretched and the gradient of this particular field points in a direction that swings between the two. That is a fact about the field as much as about the map, which is why the ranking chart above quotes the direction error — which is a property of the projection alone — and this one quotes a case.

What was computed, and how

The gradient is computed twice by routes that share no arithmetic, which is the only reason to believe either.

The first route is analytic. Each field is a sum of monomials in the Cartesian coordinates of the unit sphere, and for any function defined in a neighbourhood of the sphere the gradient of its restriction is the tangential part of the ambient gradient:

 ⁣Sf=(Ir^r^T)F.\nabla_{\!S} f = (I - \hat r\,\hat r^{\mathsf T})\,\nabla F.

The ambient gradient of a monomial is another monomial, so the surface gradient is exact — no step size, no truncation, no differencing. That matters more than it would elsewhere, because every measurement here is a ratio of two gradients, and a difference of two approximations would put the projection’s effect and the differencing error into the same number.

The second route is a central difference of the field’s own value, stepped east and north by a stated ground distance. Over five points on three fields it agrees with the analytic gradient to 1.9 × 10⁻¹⁰ relative, which checks the algebra rather than the formula — and the algebra is where the mistakes are.

The page gradient is then A⁻ᵀg with A assembled from the projection’s own local frame, which is the same matrix the error ellipse is pushed through and the same one the indicatrix comes out of. Its two singular values are checked against distortion’s own a and b, by sweeping 720 unit covectors through A⁻ᵀ and taking the extremes: the sweep agrees with 1/b and 1/a to six figures at every projection tried.

The bearing comparison is made the way a reader makes it. The true bearing is measured from north on the ground. The read bearing is measured from grid north — the image of the meridian at that point — because that is the only north visible on the page. Measuring from the page’s own vertical instead would fold in the convergence of meridians, which is a real effect and a different essay’s subject, and would have inflated every number here.

The bearing error round the compass on Lambert cylindrical. At one point, the error swept over every direction the gradient could run in. It is zero four times — where the gradient lies along one of the indicatrix's two principal axes, which are at right angles, so there are four such directions — and reaches 22.40° between them. The curve is the indicatrix's own axis ratio of 2.233 acting on a covector, which is the same trigonometry the indicatrix distorts a direction by with the ratio inverted.
Fig. 6 At one point, the bearing error swept over every direction the gradient could run in. It passes through zero four times, which is where the gradient lies along one of the two principal axes, and the axes are perpendicular so there are four such directions. Between them it reaches a maximum set by the axis ratio, which is 2.2335 at this point.

Where the model stops

The field is not terrain. It is a polynomial on the sphere with a stated formula, chosen so that its gradient is exact. Real elevation is rough at every scale, and a slope computed from a real model depends on the cell size — which is an entirely separate error that this measurement deliberately excludes. Adding a real surface would not change any number here; it would add a second, larger error on top of them.

The comparison is of a direction field, not of an algorithm. A hillshade or an aspect raster computed from a projected grid also carries the resampling error that moving a raster between projections invents, and the two errors are of comparable size at coarse resolutions. Separating them is what makes each measurable.

The point scale factor is a local statement. The read-slope curve assumes a reader converts page distance with one scale for the whole sheet, which is what a scale bar invites and what a scale bar is right in one place says about the assumption. A reader who applied the local scale factor at each point would recover the true magnitude and would still get the direction wrong on any map that is not conformal, which is the split this essay is about.

The generalisation

The rule that comes out of this is short and it contradicts the advice this collection gives everywhere else.

For areas, use an equal-area projection. That is what the projection that shows true size is for, and it is right.

For the derivatives of a field, use a conformal one. Not because conformal maps are gentle, and not because they preserve shape at the sizes anybody draws — they do not — but because the direction of steepest descent is an angle, and preserving angles is the one thing a conformal map does exactly.

And an equal-area projection is precisely the worst choice for that purpose among the well-behaved ones, because ab = 1 forces a/b = a², so an equal-area map’s angular deformation is as large as its areal fidelity is perfect. The trade-off that two lines force has a third face here: a map cannot serve a field’s areas and its derivatives at once, and the choice between them is not a matter of taste.

Who found it, and when

The transformation law for a covector is nineteenth-century tensor analysis and belongs to nobody in particular; it is the distinction between a contravariant and a covariant index, which Ricci and Levi-Civita systematised in the 1890s and which is the reason those two words exist.

Tissot’s indicatrix is 1881 and is a statement about the contravariant side. What is odd, and what makes this rung worth a whole essay, is that the covariant side does not appear in the cartographic literature at all: distortion is catalogued in terms of what happens to circles, lengths, angles and areas, and the object every terrain analysis actually differentiates is not any of those.

The applied consequence has been rediscovered in geographic information systems repeatedly since the 1980s, usually as a note that slope and aspect should be computed in an equal-area or a conformal projection depending on who is writing, and usually without a measurement. The measurement is what settles it.

Where the ladder goes next

This rung establishes what a map does to a field’s first derivative at a point. Two things follow from it and neither is obvious.

The first is that there is one thing about a field no map can get wrong — which value sits at which point — and that everything a reader takes off the contours drawn from those values is wrong anyway.

The second is what happens when the direction field is integrated rather than sampled. A drainage network is the set of steepest-descent trajectories of a field, so a map that preserves the direction preserves the network exactly, and one that does not sends water somewhere else.

What this makes readable

Essays that name this one as a prerequisite.

Named alongside this one

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

What links here

Every essay whose body links to this one.

The objects this essay names

Each one links to every other essay that touches it.

AnisotropyConformalityDualityEqual-areaGradientIndicatrixJacobianPrincipal directionScale factorSingular valuesTest fieldThematic mapping