What a machine does with it

A real edge has a width

Thirteen edges were measured and every one of them was exactly discontinuous, which no sensor has ever produced. Convolving them with a point-spread function of one degree — a cell or two — takes the three kernels from 0.78, 0.58 and 0.60 back to 1.23, 1.97 and 3.60, and takes the edge along a parallel, which converged at −1.49, up to 1.92 for bilinear and 3.73 for cubic.

Measuring three resampling kernels across thirteen edges found orders spanning 0.19 to 0.87, a ranking that reverses with orientation, and an edge lying along a parallel whose error rose at two of four refinements. It also recorded, in the same breath, what was wrong with the whole family: every edge in it was exactly discontinuous, and no instrument has ever produced one.

Reprojecting a raster invents values, and how badly it invents them was measured against a test field that had one property no real field has.

A sensor integrates over a footprint. The atmosphere scatters. The optics have a point-spread function. By the time a boundary reaches a raster it is already smoothed across a cell or two, and nothing in the earlier measurement had any smoothing in it except the resampling’s own.

The edge, before anything is resampled. A cross-section of the source field at three blur widths. The step is what every edge in this family has been until now; the other two are the same step convolved with a Gaussian of 0.25° and 1°, which is exactly ½(1 + erf(d/σ√2)). Nothing about the resampling has changed — this is the thing being resampled.
Fig. 1 The thing being resampled, in cross-section. The step is what every edge in the family has been. The other two are the same step convolved with a Gaussian of 0.25° and 1°, which is exactly ½(1 + erf(d/σ√2)). The resampling code is untouched; only the field has changed.

What the width does

Give the edge a width and the kernels get their orders back. Every edge this collection has resampled across has been exactly discontinuous, which is not what a sensor produces: a footprint, an atmosphere and a lens all smooth a boundary over a cell or two before anything is resampled. Convolving the edge with a Gaussian of stated width and refitting gives 1.23, 1.97 and 3.60 at one degree of blur, against 0.78, 0.58 and 0.60 with no blur at all. The blur is held fixed in degrees while the grid refines, which is what happens to a real sensor's data as its resolution improves.
Fig. 2 The fitted convergence order of each kernel against the width of the edge, for the family’s own 27° tilt. The grey lines are the orders the three kernels are supposed to have. The blur is held fixed in degrees while the grid is refined, which is what happens to a real sensor’s data as its resolution improves.
width of the edge cells at the finest grid nearest bilinear cubic
0 (a discontinuity) 0 0.78 0.58 0.60
0.10° 0.27 0.91 0.85 0.98
0.25° 0.67 1.07 1.30 1.80
0.50° 1.33 1.18 1.72 2.89
1.00° 2.67 1.23 1.97 3.60
2.00° 5.33 1.20 2.01 3.66

An edge has no order of convergence is where this ladder first found the orders collapsing, and it named the discontinuity as the cause without asking what happens when there is not one.

At one degree of blur the three kernels are at 1.23, 1.97 and 3.60, against textbook values of 1, 2 and 3. The orders are back, and they were never a property of the kernel — they are a property of the kernel and the field, and the field the earlier rung used had no derivatives at all.

The threshold is worth reading off the second column. The order is essentially recovered once the blur is a cell or two at the finest grid in the sequence, and the recovery is gradual rather than sudden: a boundary smoothed across two thirds of a cell already gives cubic 1.80 rather than 0.60.

Cubic overshoots its nominal 3, reaching 3.60 and 3.66. That is not a mistake in the fit. Over a sequence of grids where the blur goes from a fifth of a cell to nearly three cells, the field is becoming better resolved faster than the grid alone would make it, so the error falls faster than the asymptotic rate — the fitted slope measures the approach to the asymptotic regime and not the regime itself. It is the same reason a convergence study on a boundary layer reports an inflated order until the layer is resolved.

Why the recovery is gradual

The shape of the climb is worth a paragraph, because it says what quantity actually governs it.

What matters is not the blur in degrees but the blur in cells, and that changes through the refinement sequence. At 0.25° of blur the edge spans a fifth of a cell on the coarsest grid and two thirds of one on the finest, so the sequence starts in the discontinuous regime and ends in the smooth one, and the fitted slope is an average over the transition. At 2° the edge spans one and a half cells at the coarsest and five at the finest, and every grid in the sequence is in the smooth regime.

That is why the last two rows of the table barely differ: once the coarsest grid resolves the edge, adding more blur changes nothing. The order is recovered when the coarsest grid in the study resolves the transition, not the finest — which is a practical instruction for anybody running a convergence study, and the opposite of the intuition that the fine end is what matters.

The edge that did not converge at all

The sharpest test is the case the earlier rung found most alarming. An edge lying along a parallel — the alignment every rectangular boundary in an image has — gave nearest-neighbour a fitted order of −1.49: the error grew as the grid was refined, because refining changed whether the discontinuity happened to fall on a cell boundary, and the error swung over a factor of thirty-three.

The edge that did not converge at all. The same measurement for an edge lying along a parallel, which is the case that came out at −1.49 for nearest-neighbour — an error that grew as the grid was refined, because refining changed whether the discontinuity fell on a cell boundary. A blurred edge has no such alignment to have: bilinear climbs from 0.33 to 1.92 and cubic from 0.19 to 3.73. Nearest-neighbour reaches only 0.52, because it is not a filter and a smooth field does not help it.
Fig. 3 The same measurement for the aligned edge. Bilinear climbs from 0.33 to 1.92 and cubic from 0.19 to 3.73. Nearest-neighbour reaches only 0.52.
width of the edge nearest bilinear cubic
0 −1.49 0.33 0.19
0.25° −1.33 0.90 1.04
0.50° −0.46 1.47 2.39
1.00° 0.24 1.75 3.34
2.00° 0.52 1.92 3.73

The sign is the striking part. A fitted order of −1.49 means the answer got worse every time the grid was refined, over a factor of thirty-three, which is the behaviour of a measurement that is sampling a lattice coincidence rather than a limit.

A blurred edge has no alignment to have. There is no cell boundary for a smooth transition to fall on, so the pathology disappears entirely and both smoothing kernels recover: bilinear to 1.92 and cubic to 3.73. The divergence was a property of the test field.

Nearest-neighbour reaches only 0.52, and that is the finding within the finding. Nearest-neighbour is not a filter — it moves values without combining them — so a field with more derivatives does not give it more to work with. Its error is the distance a value is moved, which is set by the grid geometry and not by the field’s smoothness, and no amount of blurring changes that. That is the same reason nearest-neighbour’s variance loss is erratic where the smoothing kernels’ is systematic. Every other rung of this ladder has treated the three kernels as a family with three orders; this one separates them into two that respond to the field and one that does not.

The threshold, stated for the coarsest grid

The observation that the coarsest grid decides the recovery is the practical half of this rung, and it can be turned into a number a convergence study can be designed against.

The sequence here runs from 48 cells across the sixty-degree box to 160, so the cell is 1.25° at the coarse end and 0.375° at the fine one. Expressing each row’s blur in cells of the coarsest grid rather than the finest gives 0.08, 0.20, 0.40, 0.80 and 1.60 — and against them the cubic orders are 0.98, 1.80, 2.89, 3.60 and 3.66.

Read that way the pattern is clean. Cubic passes its nominal 3 as the coarsest grid crosses about half a cell of blur, and the last two rows differ by 0.06 because both are past one cell and there is nothing left to gain. The order is recovered when the coarsest grid resolves the edge, and quoting the blur in cells of the finest grid — which is what the original table does — overstates how resolved the sequence was by the refinement factor.

Which gives a design rule for anybody running such a study. Over a refinement factor R, every grid in the sequence is in the smooth regime only if the blur is at least R cells wide at the finest grid. Here R is 3.33, so the 2° row’s 5.33 cells at the fine end is the first row that satisfies it — and it is the row whose orders have stopped moving.

The corollary is unwelcome and worth stating. A convergence study over a wide refinement range is harder to keep in the smooth regime than a narrow one, because the coarse end gets coarser. Doubling the range of the study does not double the confidence in the fitted order; it doubles the blur the field needs before the fit means anything.

One kernel is outside all of this and stays outside it. Nearest-neighbour reaches 1.20 on the tilted edge and 0.52 on the aligned one, and neither moves with further blurring. Its error is the distance a value was carried rather than a difference between a function and its interpolant, so the field’s smoothness cannot help it — and the gap between 1.20 and 0.52 is a fact about how the two orientations quantise that carried distance, which nothing in this rung’s apparatus separates. It is the one number in the table this measurement does not explain.

What the previous rung’s numbers mean now

Both measurements are correct and they answer different questions, so it is worth being explicit about which is which.

One edge is not an edge measures how a kernel behaves at a mathematical discontinuity, which is the right model for a categorical raster — a land-cover class, a political boundary, a mask. Those really are discontinuous, and no instrument smooths a label. Its orders of 0.19 to 0.87 and its reversing ranking stand exactly as they are, and they are the numbers to use for anything with classes in it.

This rung measures how a kernel behaves at a physical edge, which is the right model for a measured quantity — reflectance, temperature, elevation. Those arrive smoothed, and the textbook orders apply as soon as the smoothing spans a cell.

The dividing line is not the data’s format but what was sampled, and it is invisible in a file — which is a coordinate without its system in a new place: the bytes do not carry what they mean. A GeoTIFF of surface temperature and a GeoTIFF of land cover are the same bytes with the same header, and resampling them with the same kernel produces errors of entirely different orders. The operation decides the coordinate system made the same kind of point about which frame to work in; this is the same rule applied to which kernel to choose.

The convergence order across an edge, against the edge's own orientation. Each curve is one kernel, fitted the same way as every other convergence order on this site: the root-mean-square error against the grid spacing, in logs, over five refinements. At 27° they read 0.78, 0.58, 0.60, which is the measurement already published here — and 27° is one point. Turn the edge onto a parallel and the curves collapse, and the nearest-neighbour one goes negative, which is the fit's way of saying the error is not falling at all. A single number for "the order across an edge" is a number about the edge that was measured.
Fig. 4 The measurement this rung is repairing: the fitted order against the edge’s orientation, for a sharp edge. The spread across orientations is a factor of four and the ranking between kernels reverses. Every point on it is a number about a discontinuity.
One row across the edge, after a round trip. A single row of a raster whose values are 0 on one side of a line and 1 on the other — a land-cover map with two classes — warped into another projection and back. Nearest-neighbour returns a step in the wrong place by up to half a cell and no other value; bilinear returns a ramp; the cubic kernel overshoots to 1.082 and undershoots to -0.004, which are values no input cell held. On a class raster those are classes that do not exist, and no refinement removes them: they are what a kernel with negative weights does at a step.
Fig. 5 Where the error actually sits: a cross-section of the resampling error across the edge, which is confined to a band a few cells wide. That is why the order is decided by the edge and not by the rest of the scene — and why giving the edge a width changes the order at all.

Neither of those pictures separates the band at the edge from the rest of the scene, and that separation is what turns the finding from an observation about orders into a statement about where the error lives.

How many values come back, from a raster that held two. A two-class raster warped and returned, and the number of distinct values in the result. Nearest-neighbour returns 2, which is what went in. Bilinear returns 278 and the cubic kernel 671, and none of the new ones is a class. The RMS errors are nearest 0.0334, bilinear 0.0339, cubic 0.0251, so the cubic kernel has the smallest error of the three and the most useless output of the three. The question a class raster answers is which class, and an average of two classes is not one of them: this is the case where the ranking by convergence order is not merely weakened but reversed.
Fig. 6 The other half of the distinction this rung draws: the error split by distance from the edge. Away from it every kernel converges at its textbook order on a smooth field, and everything measured here is about the band a few cells wide where it does not.

What was computed, and how

The blurred field is the step convolved with a Gaussian, which has a closed form: ½(1 + erf(d/σ√2)), with the distance d signed and measured from the edge in degrees. The error function is Abramowitz and Stegun’s rational approximation, good to 1.5 × 10⁻⁷, which is far below anything measured here.

The rest of the apparatus is untouched. The same warp round trip, the same five grid sizes from 48 × 32 to 160 × 110, the same equirectangular-to-Lambert-azimuthal reprojection, the same least-squares fit of log error against log cell size. Setting the blur to zero returns the earlier rung’s numbers exactly, which is the control that says nothing else changed.

The blur is stated in degrees of the source grid and held fixed while the grid refines. That is a deliberate choice and it is the physically meaningful one: a sensor’s point-spread function is a fact about the instrument, and improving the resolution of the grid the data is stored on does not sharpen it. Holding the blur at a fixed number of cells instead would keep the edge equally unresolved at every refinement and would reproduce the discontinuous case, which is a useful check and is not the question.

The assertions have to refuse. They require the unblurred orders to sit well below 1, 2 and 3 — which is the earlier rung’s own finding, and if it stopped being true the two measurements would be inconsistent — and require the blurred ones to climb. For the aligned edge the refusal is sharper still: nearest-neighbour’s order must be negative when the edge is sharp, and must rise by at least 0.3 once it has a width.

The instruction, in one line

Anybody choosing a resampling kernel for measured imagery can take the textbook orders — one, two and three — because a measured edge is smoothed by the instrument that measured it and the orders hold as soon as the smoothing spans a cell.

Anybody choosing one for categorical data cannot, because a label has no point-spread function, and the orders there are the ones the previous rung measured: 0.19 to 0.87, reversing with orientation, and negative for an edge along a parallel.

The two cases are the same file format and the same function call. What separates them is whether the quantity in the raster was sampled from something continuous or assigned from a list, and that is a fact about the data’s provenance rather than about its type — which is why it is not in the header, and why the choice of kernel is made by default in almost every pipeline that makes it.

Where the model stops

The point-spread function here is a Gaussian and is the same in every direction. A real one is neither: a sensor’s footprint is elongated across the scan, an atmosphere’s scattering has a long tail, and the combination is a kernel with structure. What is measured here is the existence of a width and the order it restores, and the shape of the smoothing enters only through how fast the field’s derivatives grow.

The blur is applied in the source grid’s coordinates, before the reprojection. A real edge is smoothed on the ground, and the projection then stretches that smoothing unequally — so a boundary that is one cell wide at the centre of a scene is more or less than one cell wide at its corner, by the areal factor. Over the sixty-degree box used here that is a factor of about 1.4, and it is not modelled.

And the interesting quantity for anybody choosing a kernel is not the asymptotic order at all. It is the error at the one grid size they have, which depends on the blur, the orientation, the projection and the kernel together — and the honest form of this rung’s advice is: it has to be measured on the field in hand rather than quoted from a table, which is what the machinery here exists to make possible. The tolerance decides the model is the same instruction given to a surveyor.

The generalisation

The result that survives is about convergence studies rather than about maps. A measured order is a joint property of a method and the function it is applied to, and reporting it without the function is reporting half a measurement. Numerical analysis knows this — every textbook order comes with a smoothness hypothesis attached — and applied fields routinely quote the order and drop the hypothesis.

What this ladder adds is a case where the hypothesis fails in a way nobody would think to check: not because the field is pathological, but because a test field was built as an idealisation of a real one and the idealisation removed the exact property the order depends on. The step function is the obvious way to write down an edge, and it is the one edge no instrument produces.

There is a third case and it is common: a raster whose values are continuous and whose edges are not, because a category boundary has been burned into it. A land-cover fraction, a masked ocean, a clipped scene. Those have the smooth interior of the first case and the sharp boundary of the second, and the order measured over the whole scene is an average of two regimes weighted by how much of the scene is near an edge — which is why a convergence study on a real image gives a number between the two and matching neither.

Who found it, and when

Cubic convolution’s third-order accuracy is Keys’, from 1981, stated with the smoothness hypothesis in the theorem where it belongs. Its migration into practice without the hypothesis is undocumented and probably undocumentable — it is the sort of thing that happens between a paper and a manual.

The point-spread function of a satellite instrument has been characterised since the first ones flew, and the modulation transfer function is a published specification of every imaging sensor. So both halves of this measurement have been available for forty years, and putting them together requires somebody to be asking about the convergence order of a resampling kernel, which is a question that arises only when a warp is being checked rather than performed.

Where the ladder goes next

Seven rungs have moved a raster between projections, priced what the interpolation invents, measured its order across edges of six orientations and three shapes, and now given the edge a width. The remaining question is one the whole ladder has assumed away: what happens when the two grids are not the same kind of thing — when the target is not a raster at all but a set of irregular cells, which is a different operation with a different conservation law and which the cell ladder has been building the machinery for.

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.

AliasingConvergence orderDiscontinuityInterpolation kernelOrientationRasterRefinementResamplingSampling latticeTest fieldToleranceWarp