Concept

Resampling — where it appears

Reading a raster at positions its cells do not sit on, which every reprojection requires and which no kernel does without cost. Its kernel has an advertised order of convergence that is recovered on a smooth field and is not recovered at an edge.

Named by 8 essays across 2 fields — each of them below, with the objects they name alongside it.

A raster warped to Lambert azimuthal equal-area and back, nearest against bilinear. The left panel is the field the raster carries — a smooth analytic function, so that the error of an interpolation is the interpolation's error and not a photograph's history. The other panels are what is left after warping into Lambert azimuthal equal-area and back to Equirectangular, shown as the difference from the original at six times the contrast. Nothing moved: the coordinates go through the maps exactly. What is lost is that a target pixel's centre does not fall on a source pixel's centre, so a value has to be invented for it. Bilinear is closer to the field — RMS 0.0022 against 0.0212 — and has given up 0.63 per cent of its variance to get there. The panels are drawn at 48 by 32 cells; the measurement is made at the same resolution.

Reprojecting a raster invents values

Moving a picture from one projection to another moves no coordinate — the maps are exact both ways. What is lost is that a target cell's centre does not land on a source cell's centre, so a value has to be made up for it, and the making-up has an order of convergence: 1.00 for nearest, 1.98 for bilinear, 2.93 for a cubic, measured by refining the grid.

applied · Dataset
The circle a reprojection is about to turn into an ellipse. A circle drawn on the Mollweide plane, and its image under the map that carries that plane to Mercator — normalised so each pair has the same area, because the whole map can be rescaled and the shape is what is being shown. The dashed circle is what an undistorted reprojection would leave. This is Tissot's construction with a plane in place of the sphere, and it is the right picture for a reprojection because both ends are pictures. Worst angular deformation over the sampled points: 81.2°. Drawn on the source plane, in Mollweide.

A projection between two projections

Every distortion measured on this site so far compares a map with the sphere. The operation a machine actually performs compares a map with another map — and that map has its own two principal scales, its own areal factor and its own angular deformation, none of which is the difference of the two it was built from.

distortion · Tissot
The same kernels, across an edge. Each kernel measured over the same five rasters as the smooth measurement, on a field that carries a step across a tilted line instead of a smooth function. The solid lines are the edge and the faint ones the smooth field. The orders on the smooth field are nearest 1.00, bilinear 1.98, cubic 2.93; across the edge they are nearest 0.78, bilinear 0.58, cubic 0.60 — within a factor of 1.33 of one another, and the fastest of them belongs to nearest-neighbour, which does no interpolating at all. The ranking a smooth field establishes does not survive a discontinuity, and a real raster is mostly edges.

An edge has no order of convergence

On a smooth field the three resampling kernels converge at orders 1, 2 and 3 and the choice is obvious. Across a discontinuity they converge at 0.78, 0.58 and 0.60 — within a factor of 1.4 of each other, in an order that puts nearest-neighbour first, and a real raster is mostly edges.

applied · Dataset
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.

One edge is not an edge

The three resampling kernels were measured across a discontinuity and came out at 0.78, 0.58 and 0.60 — one straight edge at 27° to the graticule. Across thirteen edges the same kernels span 0.19 to 0.87, the ranking between them reverses, and for an edge lying along a parallel the error does not fall with refinement at all.

applied · Dataset
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.

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.

applied · Dataset
One field, one round trip between two cell schemes. Left: a stated field binned into an equal-angle grid of 36 by 18 cells. Right: the same field after being rebinned into an equal-area grid of 30 by 15 offset by six degrees of longitude, and rebinned back. Every step is exact area-weighted averaging, the total is preserved to 2 × 10⁻¹⁶, and the root-mean-square difference between the two pictures is 0.144 on a field whose own standard deviation is 0.370.

The same data on two grids

Five essays have addressed, queried and ordered cells within one scheme and nobody has moved a number between two. Doing it exactly — area-weighted, both directions — preserves the total to 2 × 10⁻¹⁶ and loses 39 per cent of the field's own standard deviation in a single round trip; six round trips leave 23 per cent of its variance. The quantity that would reveal the damage is the one that never moves.

applied · Cells
What a rebinning loses depends on where the target's edges are. Two grids of fixed counts, fixed shapes and fixed resolution, with the target slid across the source from perfect alignment to a full cell. Nothing about either grid changes except where its boundaries fall. The loss runs from 27.5 per cent at zero to 56.3 at half a cell — a factor of 2.04 — and the longitude-only curve returns to its starting value at a full cell to six decimal places, which is the periodicity check. A cell boundary that coincides with a target boundary loses nothing, and a grid comparison that does not say where its boundaries are has left that out.

When the edges do not line up

Rung eight held the cell counts equal so that shape could be compared without the count ratio drowning it, and recorded a doubt: a longitude–latitude source shares its boundaries with a longitude–latitude target wherever their counts share a factor. The mechanism is real and worth a factor of two. It was not what the published number was made of.

applied · Cells
One map, two samples, two answers. The same Miller cylindrical projection carrying two sets of sample points of the same size. On the left the points are uniform over the SPHERE — equal ground area between them, which is what every mean in this collection integrates against. On the right they are uniform over the PAGE, which is what a raster, a pixel loop or any figure that walks its own canvas produces. The right-hand set crowds where the map stretches, and the mean angular deformation it returns is 18.0° against the left-hand set's 7.2°.

The sample was drawn on the page

Every mean in this collection integrates over the sphere, because that is where the ground is. A raster, a pixel loop and any figure that walks its own canvas integrate over the page instead, and the difference is exactly the covariance between the quantity being measured and the map's own area distortion — 7.2° of mean angular deformation on Miller becoming 18.0°.

distortion · Sampling

Named alongside it

The objects these essays reach for when they reach for this one.

RasterConvergence orderAliasingDiscontinuityInterpolationSampling latticeToleranceVerificationWarpAggregationAngular deformationAreal factor

All concepts