Measuring distortion

The curvature of a field is not the curvature of its picture

Whether a place is a spur or a hollow is the sign of a second derivative, and every automatic terrain classification is built on it. Read off an equal-area grid, that sign is wrong on 13.25 per cent of a sheet — and conformality reduces it to 0.30 per cent without removing it.

This field has two ladders about second derivatives and they are about different objects. One of them found that bending and stretching are one failure; the other has been about a slope, a contour and a flow line.

The flexion ladder measures the second derivative of the projection — how a straight thing on the ground bends on the page. This rung measures the second derivative of the data: whether a place is on a spur or in a hollow, which is the sign of the curvature of the contour through it.

That sign is the foundation of every automatic terrain classification, every distributed hydrological model and every soil-landscape mapping scheme in use. It is computed from a raster, in the raster’s own units, with no metric anywhere.

Conformality helps and does not save it. The proportion of a stated terrain whose plan curvature changes sign when it is read off a grid in each projection. A conformal map turns every direction through the same angle, so the contour and the slope line stay perpendicular and the sign ought to survive — and it mostly does, at 0.30 per cent against 13.3. It is not zero, and the term that flips it is the gradient of the scale factor: the curvature of a curve under a conformal map is (κ − ∂ₙ log λ)/λ, and Mercator's λ has a gradient.
Fig. 1 The proportion of a stated terrain whose plan curvature changes sign when it is read off a grid in each projection. It runs from 0.30 per cent on Mercator to 13.25 on the equal-area cylindrical, and conformality is what separates them — but not completely, and the residue has an explanation.

The two curvatures a terrain has

At a point on a surface with a gradient, two curvatures are conventionally reported.

Plan curvature is the curvature of the contour through the point — and the contour’s own value survives while its reading does not — the level line’s own bending. It is positive on a spur, where contours bow outward, and negative in a hollow. It controls whether flow converges or diverges, which is why it appears in every runoff model.

Profile curvature is the curvature of the slope line — the path of steepest descent. It is positive where the slope steepens downhill and negative where it flattens, and it controls acceleration rather than convergence.

Both are combinations of the field’s three second partial derivatives with respect to ground distance, and neither is invariant under a change of coordinates that is not an isometry.

What a raster computes instead

A raster differentiates with respect to its own axes, exactly as a hillshade takes its light from the page. A three-by-three window gives first and second differences in cell units, the formulae above are applied to them, and the answer is labelled plan curvature.

Nothing in that chain uses a metric. The cell size is applied as a scalar, if at all, and a scalar cannot repair an anisotropic map — it corrects the magnitude by one factor and leaves the mixing between the two directions untouched.

That mixing is the whole problem. Plan curvature is built from the second derivatives combined with weights that depend on the gradient direction, so a map that stretches one axis relative to another changes both the derivatives and the weights, and the two changes do not cancel.

Where the page says spur and the ground says hollow. Each sample of a stated terrain, classified by the sign of its plan curvature — the curvature of the contour through it, which is what separates a spur from a hollow and what every automatic terrain classification is built on. Computed on the ground, and computed again the way a raster in Lambert cylindrical computes it: from its own coordinates, in its own units, with no metric anywhere. The marked samples are where the two disagree about the sign — 138 of 1086, 12.7 per cent of the sheet.
Fig. 2 Each sample of a stated terrain, classified by the sign of its plan curvature, computed on the ground and again the way a raster in the Lambert cylindrical projection computes it — from its own coordinates, in its own units, with no metric anywhere. The marked samples are where the two disagree about the sign.

Thirteen per cent

On the equal-area cylindrical, 13.25 per cent of samples are classified differently by the page than by the ground.

That is one cell in eight given the wrong answer to a binary question, and the wrong answer is not random: it is concentrated where the map is most anisotropic, which is at the high-latitude end of the sheet. So a classification map produced this way has a systematic band of misclassification rather than scattered errors, and a band is exactly what a reader interprets as a landscape pattern.

Why an equal-area map is the worst choice here

The ranking in the first figure is not arbitrary and it inverts the usual advice.

An equal-area projection is the standard recommendation for anything involving quantities per unit area, and terrain analysis involves several. It is the worst projection in the list for this particular quantity, because holding the product of the two principal scales fixed is a way of guaranteeing that they differ: the more it stretches one direction the harder it must squeeze the other.

Plan curvature is built from a ratio of directional quantities, so it is sensitive to exactly the anisotropy that equal-area maps maximise. The projection chosen to protect one derived quantity is the one that most damages another, and both quantities come out of the same raster.

How Lambert cylindrical distorts, by latitude. Angular deformation and areal scale plotted against latitude along the meridian at 0°. On Lambert cylindrical the angular deformation reaches 160.1° and the areal factor reaches 1.0.
Fig. 3 The reason, from the field’s own first ladder: the two principal scale factors of the equal-area cylindrical against latitude. Their product is one everywhere, which is the property it was built for, and their ratio grows without bound — which is the property a second derivative is sensitive to.

Conformality helps, and does not save it

A conformal map turns every direction through the same angle and scales both by the same factor. So the contour and the slope line stay perpendicular, the weights in the plan-curvature formula are unchanged, and the sign ought to survive.

Mostly it does: 0.30 per cent against 13.25, a factor of forty-four. But it is not zero, and the residue is stable under refining the difference stencil by a factor of eight — so it is a term rather than an arithmetic artefact.

The term is the gradient of the scale factor. Under a conformal map with scale λ\lambda, the curvature of a curve transforms as

κpage=κgroundnlogλλ,\kappa_{\text{page}} = \frac{\kappa_{\text{ground}} - \partial_n \log\lambda}{\lambda},

where n\partial_n is the derivative across the curve. Conformality fixes the shape of the local map and says nothing about how λ\lambda varies from place to place, and Mercator’s varies as secφ\sec\varphi.

So wherever the ground curvature is small enough to be dominated by nlogλ\partial_n \log\lambda, the sign flips. That is five samples of 1,675 on this terrain, and it would be more on a flatter one.

The magnitude is worse than the sign

The magnitude is wrong by orders of magnitude, and not by a constant. Every sample's plan curvature as read from a Lambert cylindrical grid, divided by its value on the ground, against latitude. If the projection merely scaled the quantity the points would lie on one curve; they do not, because the ratio depends on which way the contour runs as well as on where it is. The spread is 3.2e+6 to one, and the horizontal line is where a reader assumes the points are.
Fig. 4 Every sample’s plan curvature as read from an equal-area grid, divided by its value on the ground, against latitude. If the projection merely scaled the quantity the points would lie on one curve; they do not, because the ratio depends on which way the contour runs as well as on where it is.

The sign is the headline because it is a classification. The magnitude is worse and is used just as often — curvature enters hydrological models as a number, not as a category.

Read off an equal-area grid the magnitude is out by factors spanning five orders of magnitude across the sheet, and it is not a function of position alone: two samples at the same latitude with contours running different ways get different corrections. No single scalar per cell repairs it.

The refusal, and what it establishes

Over a window four degrees across, no projection flips anything — nought of 439 samples, on the projection that flips 13 per cent of the full sheet.

That is the check that makes the rest a measurement. Over a small enough region the scale factor is constant, the map is locally an affine transformation, and an affine map with equal scales in both directions preserves the sign of a plan curvature exactly. So the machinery is capable of reporting no error, and it does whenever the map is locally a similarity.

It also explains why the problem is invisible in most practice. Terrain analysis is usually done on a tile a few kilometres across, in a projection chosen for the region, and over that extent the effect is genuinely zero. It appears when somebody runs the same operator over a continent.

What the flexion ladder would say about this

The distinction between the two ladders is worth making sharply, because they measure the same order of derivative.

flexion asks what the map does to a straight thing: a geodesic that is straight on the ground and curved on the page, with the curvature being a property of the projection alone. Its subject exists whether or not any data is present.

This rung asks what the map does to a quantity carried by the data. The field has its own second derivative on the ground; the page reports a different one; and the difference involves both the map’s derivatives and the field’s, which is why it is not a property of either alone.

The second derivative is not an invariant established that the map’s own flexion depends on the parameterisation. This rung establishes the corresponding thing for data: a field’s curvature computed in page coordinates is not the field’s curvature, and the correction is not a constant.

What a correct implementation would do

It would compute the derivatives against ground distance rather than against cell indices, which means carrying the metric into the neighbourhood operator.

For a conformal projection that is nearly easy: divide by λ2\lambda^2 for the second derivatives, and add the nlogλ\partial_n\log\lambda term, both of which are closed forms. For a non-conformal one the local map is anisotropic and the three second derivatives have to be transformed as a tensor, which is a handful of multiplications and is not what any implementation does.

The obstacle is the one the previous rung named: the operator is a neighbourhood operator on an array and does not know where it is. Passing the projection into it is an interface change rather than an algorithmic one.

Where the page says spur and the ground says hollow. Each sample of a stated terrain, classified by the sign of its plan curvature — the curvature of the contour through it, which is what separates a spur from a hollow and what every automatic terrain classification is built on. Computed on the ground, and computed again the way a raster in Albers equal-area conic computes it: from its own coordinates, in its own units, with no metric anywhere. The marked samples are where the two disagree about the sign — 8 of 1086, 0.7 per cent of the sheet.
Fig. 5 The same classification on an equal-area conic, which is the projection a continental terrain product is most likely to be in. Its flipped fraction is under one per cent rather than thirteen, because a conic fitted to the region has far less anisotropy over it than a cylindrical projection does — the choice of projection changes the size of the error by more than an order of magnitude and does not remove it.

Two derivatives, two failure modes

It is worth separating the two curvatures, because they fail differently and only one of them is usually noticed.

Profile curvature is taken along the slope line, which is a single direction. A map that scales that direction by λ\lambda scales the curvature by roughly 1/λ1/\lambda, and if the map is conformal that is the whole story — the correction is a scalar and it is the same for every profile curvature at that point.

Plan curvature is taken along the contour, which is perpendicular to the slope, and the formula combines all three second derivatives with weights set by the gradient. A map that treats the two directions differently changes the weights, and no scalar repairs that.

So a user who has heard that curvature needs a correction, and who applies a scale factor, has fixed the profile curvature and left the plan curvature approximately as wrong as it was. That is worse than not correcting, because the two layers now disagree in a way that looks like a real feature.

It is worth separating this from the map’s own second derivative, which is a different quantity with a similar name. A projection bends straight lines, and that bending exists with no data present at all; the curvature measured here needs a field to be about. Two second derivatives, two failure modes, and no overlap between them.

Where this bites in practice

Continental and global terrain products, where the scale factor is a field rather than a number. A curvature layer computed over a whole continent in one projection carries a systematic error that varies across it, and the variation looks like a landscape signal.

Comparisons between regions. Two study areas in the same product, at different latitudes, have curvature layers scaled differently by the projection — so a threshold calibrated in one is wrong in the other.

Anything using a curvature threshold, which is a tolerance deciding a model by a route nobody chose. Classification schemes cut plan curvature at zero or at a small positive value, and both cuts move when the quantity is scaled and shifted by the projection.

A classification that is a projection artefact

To put the thirteen per cent in the terms a user meets it in.

A standard landform classification cuts a terrain into nine classes on the signs of plan and profile curvature: ridge, shoulder, spur, slope, hollow, footslope, and so on. Every boundary between classes is a zero crossing of one of the two quantities.

Getting one sign wrong on 13.25 per cent of cells does not misclassify 13.25 per cent of the map into a random other class. It misclassifies them into the class across the boundary that moved, which means spurs become hollows and shoulders become footslopes — the pairs that differ in exactly that sign.

So the error has a signature: a systematic exchange between two specific classes, varying across the sheet, strongest where the projection is most anisotropic. A user who plotted class frequency against latitude would see it immediately, and nobody does, because there is no reason to expect a landform’s frequency to depend on where it is on the page.

Where the model stops

The terrain here is stated as a sum of Gaussian caps, so its curvatures are analytic and the ground values are exact. That removes the usual confound — a real terrain model has its own sampling noise, and second derivatives amplify noise badly — and it means the numbers here are a lower bound on the confusion in practice.

What is not treated is the resampling. A real projected raster has been interpolated from another raster, and the interpolation has its own effect on second derivatives, which is generally larger than everything measured here and is a different subject.

The term conformality leaves, in words

The surviving term deserves an intuition rather than only a formula, because it is the part of this rung that is genuinely surprising.

A conformal map preserves angles, so a small circle stays a circle. It does not preserve size from place to place: the same ground circle is drawn larger in one part of the sheet than another, and the change in size across the sheet is the gradient of the scale factor.

Now take a contour that is dead straight on the ground and runs from a region where the map draws things small into one where it draws them large. Its image is not straight: the far end is drawn at a bigger scale, so the curve fans out, and a fanning curve has curvature. That curvature was not in the ground quantity at all — it is the scale factor’s gradient, and it adds to whatever curvature the contour really had.

Where the real curvature is small, the added term dominates and can reverse the sign. That is the five samples in 1,675, and they are all in the flattest parts of the terrain.

Who found it, and when

The measured field is stated rather than sampled, which is what makes the ground values exact — a field that was measured has its own problems and they are not these. Plan and profile curvature in their modern form come from Evans in the 1970s and Zevenbergen and Thorne in 1987, and both papers derive them for a raster in a plane. The derivation is correct and the plane is assumed.

The geodetic correction appears occasionally in the terrain-analysis literature, usually as a note that curvature should be computed in a projection with low distortion over the study area. That advice is right and it is the practical form of the refusal above: keep the window small enough that the map is locally a similarity, and the error goes away.

What is rarely stated is that conformality is not sufficient. It is the natural thing to reach for — it preserves angles, and the quantity is built from an angle between a contour and a slope line — and it leaves a term that no choice of projection removes, because every projection of a curved surface has a scale factor with a gradient.

What survives every projection

The negative results in this collection are more useful when they come with the positive one alongside, so it is worth asking what a curvature layer can be trusted for.

Ordering within a small window survives, because over a small enough window the map is locally a similarity and a similarity preserves the sign and scales the magnitude uniformly. Comparing two nearby cells is safe.

The location of the zero crossings survives on a conformal map to the extent that the scale-gradient term is small compared with the curvature — which is to say, everywhere the terrain has structure, and not on the flats.

Nothing that crosses the sheet survives. A threshold applied uniformly, a histogram over the whole extent, a comparison between two distant regions: all of these compare numbers that were scaled differently, and the scaling is not recorded anywhere in the layer.

That is the same shape as the answer three rungs ago about slope, and one rung ago about aspect. A derived raster is a local product read globally, and the reading is where it breaks.

None of which is recorded anywhere a consumer can read. A derived curvature raster has the same header as any other raster: a coordinate system, a cell size, a band, a nodata value. There is no field that says this band was differentiated twice in this plane, so its values carry that plane’s scale factor squared — and without it, every downstream user is entitled to treat the numbers as a property of the ground.

Where the ladder goes next

Six rungs of this anchor have priced what a page does to a field’s slope, its contours, its flow and now its curvature. The unasked question is about the data rather than the geometry: every one of these is computed from a sampled field, and a second derivative of a sampled field has a noise floor that no projection is responsible for.

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.

ConformalityFlexionGradientHollowPage framePlan curvatureProfile curvatureRasterScale factorSecond derivativeSpurTerrain classification