What a machine does with it

The antimeridian is a cut in the numbers

A twenty-degree box across 180° has a bounding box of 359.4°, a planar area seventeen times too large, and a midpoint 20,015 kilometres from where it belongs — which is the antipode, exactly. Moving the cut moves the failure and never removes it, because a circle cannot be numbered by an interval.

Longitude runs from −180 to 180 and then starts again. That is not a fact about the Earth; it is a fact about how the numbers were laid out, and it is unavoidable in a way that almost nothing else in this field is.

A 20° shape across the antimeridian, in the space where the numbers live. Longitude runs across the page from −180° to 180°, which is where the failure is: the shape is one rectangle on the ground and two pieces in the numbering, and every operation that treats longitude as a real number sees the two. The bounding box comes out 359° wide instead of 20°, the planar area comes out 17 times too large because the shoelace encloses the complement, and the midpoint of a segment from one edge to the other lands 20015 kilometres away — the antipode of where it belongs. The true area, from the closed form, is 4,920,667 square kilometres.
Fig. 1 A twenty-degree rectangle across the antimeridian, drawn in the space where the numbers live. On the ground it is one shape; in the numbering it is two pieces at opposite ends of the axis. The dashed rectangle is the bounding box a program computes, the shading is what a planar area encloses, and the marked point is where the midpoint of a segment across the seam lands.

Three failures, measured

The rectangle spans 170° east to 170° west, twenty degrees of longitude and twenty of latitude, and its true area from the closed form is 4,920,667 square kilometres.

The bounding box. Taking the minimum and maximum of the raw longitudes gives −180 to 179.375, a box 359.4 degrees wide against the shape’s twenty — a factor of 18. Every operation built on bounding boxes inherits it: a spatial index says the feature is everywhere, an intersection test says it touches everything, and a viewport test says it is always on screen.

The planar area. The shoelace over the raw numbers gives 6,800 square degrees against the true 400 — seventeen times too large — because the ring, traced in the numbering, encloses the complement: everything except the shape. The number is not noise; it is the area of the rest of the world at that latitude band.

The interpolation. The midpoint of a segment from 170°E to 170°W, computed by averaging, is 0° — which is 20,015 kilometres from the true midpoint at 180°. That distance is half the Earth’s circumference, and it is exact rather than approximate: the computed midpoint is the antipode of the correct one, always, for any segment across the seam whose endpoints are symmetric about it.

Why the exactness is worth noticing

Most failures in this field are matters of degree — a factor of three here, a few thousand parts per million there. This one produces the maximally wrong answer, and it does so cleanly.

That is a property of a branch cut rather than of an approximation. Crossing it does not degrade the result; it replaces the short way round with the long way round, which for a midpoint is the antipode and for an area is the complement. There is no small version of the mistake and no tolerance below which it is safe.

The practical consequence is the opposite of what a large error usually implies. Because the failure is total, it is easy to detect — a bounding box 359 degrees wide is unmistakable — and every serious pipeline checks for it. The failures that survive are the plausible ones, as a coordinate without its system is not a location sets out: a hundred-metre datum offset lives for years, and a shape that claims to span the planet does not last the afternoon.

Moving the cut moves the failure

The obvious repair is to number longitude differently — 0 to 360, say, which puts the cut at Greenwich instead of at the antimeridian. The site’s machinery tests exactly that, over two rings and two cuts:

cut at ring across 180° ring across 0°
180° crosses does not
does not crosses

Exactly one of the two rings crosses each cut, whichever cut is chosen, and the assertion demands precisely that count. Renumbering does not remove the problem, it relocates it: the Pacific convention breaks Greenwich and the Greenwich convention breaks the Pacific.

This is not an argument that the conventions are equally good in practice. A cut through the Pacific crosses less land and fewer datasets than one through western Europe and Africa, which is why the antimeridian was chosen and why Pacific-centred maps renumber deliberately. It is an argument that the choice is about where to put an unavoidable seam, not about whether to have one.

Where longitude and latitude can be exchanged without noticing, to 1 km. An equirectangular frame with the line λ = φ drawn on it. Reversing the two numbers of a coordinate is the most common coordinate mistake there is and is usually called obvious; it is obvious everywhere except along this line, where it does exactly nothing. The marked points are 170°E 20°N, 170°W 20°N, 0°E 40°N, displaced by a latitude that does not exist, a latitude that does not exist, 6003 km. The band inside which the mistake stays under 1 kilometre is 0.013° wide at 10° and 0.017° at 70° — narrow, and not zero.
Fig. 2 The space the seam lives in: longitude as a coordinate that runs from one end of the page to the other. The two marked points near the edges are twenty degrees apart on the ground and 340 apart in the numbering, which is the whole of what a cut means.

The reason it cannot be removed

Longitude is a coordinate on a circle and the numbers are a coordinate on an interval, and a circle is not an interval. Any continuous numbering of the circle by real numbers either repeats — the same ground getting two numbers, which is what unwrapped longitudes do — or jumps somewhere, which is a cut.

That is a topological statement rather than a numerical one, and it belongs with the site’s other one. No map is faithful proves that no plane chart of a sphere preserves the metric, by computing the curvature two ways. This proves that no single chart of a circle is continuous, by a much simpler argument, and the two together are the shape of the whole subject: the failures that cannot be engineered away are the ones with a theorem behind them.

A 25° shape across the antimeridian, in the space where the numbers live. Longitude runs across the page from −180° to 180°, which is where the failure is: the shape is one rectangle on the ground and two pieces in the numbering, and every operation that treats longitude as a real number sees the two. The bounding box comes out 359° wide instead of 25°, the planar area comes out 13 times too large because the shoelace encloses the complement, and the midpoint of a segment from one edge to the other lands 6672 kilometres away — the antipode of where it belongs. The true area, from the closed form, is 3,075,417 square kilometres.
Fig. 3 A different shape across the same seam, at a latitude where the ground is narrower. The failures are the same in kind and different in size — the bounding box, the complement area and the antipodal midpoint — and none of them depends on which piece of ground is involved, only on the crossing.

What the repairs actually do

Three are in use and each gives something up.

Split the geometry. Cut the feature at the seam and store it as two pieces. Every operation then works, and the object has changed: a single island is now two, its perimeter has gained two edges that are not coastline, and any count of features is wrong by one. The repair is exact for area and lies about topology.

Unwrap the longitudes. Store 170 and 190 rather than 170 and −170. Every planar operation works, the area comes out right, and the coordinates are outside the range every specification declares — so a consumer that normalises on read undoes the repair silently.

Compute on the sphere. Use formulae that wrap the longitude difference into (π,π](-\pi, \pi] and never form a planar coordinate at all. That is what this site’s own area routine does, and the wrapping is load-bearing: without it a ring encircling the globe accumulates one 2π-2\pi step on its closing segment, which cancels the sum and reports the area of a hemisphere as exactly zero — plausible-looking until it is compared against a closed form, which is why the closed-form comparison exists.

The third is the only one that changes neither the object nor the file, and it is available only to operations written to be aware of the seam. Which is the recurring shape of this field: the repair is not to fix the data but to stop performing a planar operation on a curved thing.

What it does to a query, which is where the cost actually lands

A bounding box is not a picture; it is the key an index is built on. A feature whose box is 359 degrees wide is, as far as any index is concerned, a feature that covers the world.

Two consequences follow and they pull in opposite directions. Correctness: every query returns it, so a search for something in the Atlantic finds an island in the Pacific and the caller has to test the geometry properly to reject it. Cost: the index has stopped filtering, which is the only thing an index does — a structure whose whole purpose is to avoid testing most features against most queries now tests one feature against every query.

The reverse case is worse and quieter. A query box that crosses the seam has the same 359-degree extent, so it matches everything and filters nothing; and a query box written the natural way — from 170 to −170 — has a minimum larger than its maximum, which most implementations treat as empty. The same crossing gives everything and nothing depending on which side of the comparison it is on.

The repair is the split again: a crossing query becomes two queries, one to 180 and one from −180, and the results are merged. That is exactly what a renderer does with a crossing tile, and the tile scheme meets the same seam one layer up.

None of 300 nearest-neighbour queries changes answer over this region. 30 sites and 300 queries over 140° to 179° east and -40° to 10° north, each query answered twice — once by geodesic distance and once by straight-line distance in the stored plane. They agree 100.0 per cent of the time, which is why the operation survives, and the 0 that differ are marked — there are none here. The mechanism is not that the plane is wrong by a lot but that its scale factor varies: over this region it spans 31 per cent, and every disagreement is a contest closer than that — the worst margin measured is 0.0 per cent. The furthest a wrong answer is from the right one is 0 kilometres.
Fig. 4 A region up against the seam, where every bounding box is one degree from becoming the whole world. Not one of the three hundred queries changes answer between the two metrics here — the projection’s spread over this box is 30 per cent and no contest happens to fall inside it — which is the control the figure’s own assertion is written around: what can be claimed is that a disagreement must lie within the spread, not that one must occur.

The tiling meets it too, and solves it by repeating

The screen half of this field has the same seam and handles it in a way the data half cannot.

The projected world’s left and right edges are the antimeridian, so tile x=0x = 0 and tile x=2z1x = 2^z - 1 are neighbours on the ground and are the two extremes of the index. A map panned west across the seam therefore needs the tile at the other end of the row — and every slippy map does this by simply repeating the world horizontally, drawing the same tile column again and again as the reader pans, so the picture is continuous and the coordinates wrap.

That is available to a renderer because a picture has no identity: the same tile drawn twice is two copies of an image and nothing is claimed. It is not available to a dataset, because a feature drawn twice is two features, and asking whether they are the same object is the question the whole seam problem is about.

So the same topological fact produces a trivial fix on one side and an unavoidable choice on the other, and the difference is that one of them is only about pixels. A screen map is a pyramid of tiles has the scheme; the wrap is the one place where the map’s own coordinate system is more forgiving than the file’s.

The tile pyramid, four levels down to quadkey 133. The world as a square, quartered three times. Each level's tile is exactly half the width of its parent, so a tile is four tiles at the next level and never needs resampling to serve one — the property the whole scheme rests on, and one that holds only because the projected world is square. Level 3 has 64 tiles at 19567.9 metres per pixel, which at 0° north is 19567.9 metres of ground per pixel rather than the number the scheme publishes.
Fig. 5 The tiling’s own edges, which are the antimeridian twice. The left and right sides of the root tile are the same meridian, so the two extreme columns of every level are neighbours on the ground and are at opposite ends of the index — a wrap a renderer hides by drawing the world again.

The date line is a different line

Two seams near 180° get conflated and only one of them is in this essay.

The antimeridian is exactly 180°, everywhere, by definition: it is where the numbering wraps and it is a mathematical object.

The international date line is a political boundary that follows 180° loosely and deviates by up to thirty degrees to keep territories on one date — around the Aleutians, around Kiribati, around Samoa. It is a line on the ground that somebody drew and can redraw, and countries have moved themselves across it.

They are near each other and they are not the same kind of thing, and a dataset that treats the date line’s deviations as a coordinate seam, or the antimeridian as a calendar boundary, has confused a convention that can be renegotiated with one that cannot. This site’s business is the second; the first is a fact about jurisdictions and belongs to whoever writes about those.

The other seam, which is a point

Latitude has a singularity too and it behaves differently enough to be worth the contrast.

At the pole, every longitude names the same place. A polygon containing the pole has a ring which, traced in the numbering, does not enclose it: the shoelace gives the area of a shape that runs around the pole rather than over it, and the standard repair is to insert an artificial vertex at 90° and stitch the ring across the top.

So one singularity is a cut — a line where the numbers jump — and the other is a collapse — a point where a whole coordinate loses meaning. Both come from putting a rectangular grid of numbers on a sphere, which is the plate carrée’s own geometry, and both are why the graticule is a coordinate system rather than a map.

Where a pseudocylindrical puts its error measures the projection-side consequence of the same thing: a pole drawn as a point or as a line, and the distortion each choice buys.

The seam a projection chooses

There is a third kind of seam on this site and it is the only one anybody places deliberately.

An interrupted projection cuts the map where the tearing costs least — through oceans, for a land map — and the size of the tear is a computed quantity rather than a drafting decision. Giving up continuity is that essay, and the comparison is instructive: an interruption is a seam chosen to reduce distortion, the antimeridian is a seam forced by numbering, and a tile boundary is a seam chosen for delivery.

Three seams, three reasons, and only one of them is optional.

Sinusoidal, cut into 6 lobes. six lobes, cut through the oceans so each continent stays whole. Each lobe is the same projection about its own central meridian, so each point is near a line where the shape distortion vanishes: the mean angular deformation over the mapped world falls from 38.6° uninterrupted to 17.8° here. What is given up is that the map is no longer one surface — the graticule stops at every cut because there is nothing on the other side of it.
Fig. 6 The seam somebody chose. An interrupted projection places its cuts where they cost least and measures what each one buys, which is the opposite situation from the antimeridian’s: there the cut is forced and its position is the only free choice.

The seam and the area machinery, one layer down

The site’s own area routine has the seam handled inside it, and the way it is handled is worth reading as an example rather than as an implementation note.

sphericalArea sums a term over the ring’s edges and wraps each longitude difference into (π,π](-\pi, \pi] before using it. Without the wrap, a ring encircling the globe accumulates a single 2π-2\pi step on its closing segment, that step cancels the entire accumulated sum, and the area of a hemisphere comes out as exactly zero.

Zero is the interesting part. It is not a large wrong number that would be noticed; it is a small one, and it is the answer a degenerate ring would give, so it looks like a different bug entirely. The only way it was caught is the way everything on this site is caught: the routine is required to reproduce a closed form — a hemisphere is 2πR22\pi R^2 and a cap is 2πR2(1cosθ)2\pi R^2(1 - \cos\theta) — and the check is run on every build.

That is the seam appearing three levels below where an essay would look for it, in the interior of a function that has no idea it is near the antimeridian. Computing an area needs a surface is the essay on what that routine is for; this is the one line of it that exists because longitude is a circle.

The area of one 20° × 10° cell at 0–10° north, seven ways. The cell has an exact area — R²Δλ(sin φ₂ − sin φ₁), 2,460,334 square kilometres — so every other row is a measurement of the method rather than of the ground. The equal-area projection returns it to 1.000000 and the spherical polygon formula to 1.000000, which is three routes agreeing — and the same cell integrated on the ELLIPSOID comes out -0.43 per cent away from all three, because the sphere is a model. Taking the shoelace in Mercator gives 1.01 times too much, and treating degrees as a length gives 1.01 times — about sec φ at the cell's middle, which is where that error comes from.
Fig. 7 The routine the wrap lives inside, checked the way everything here is checked: the closed form, the spherical polygon sum and an equal-area shoelace agreeing to six decimal places on a cell that does not cross anything. The agreement is what makes the seam’s failure — seventeen times the area, on a cell that does — a measurement rather than a suspicion.

What a check would be

The failures are large, so the checks are cheap, and it is worth writing them down in the site’s own idiom — each one able to fail.

A bounding box wider than 180° is a crossing, not a feature. Nothing on Earth spans more than half the globe in longitude without spanning all of it, so a box between those is a seam artefact.

An area larger than the hemisphere’s is the complement. The closed form gives the hemisphere’s area exactly, so the comparison needs no dataset.

And a segment longer than half the circumference has been interpolated the wrong way round, since the short way is always at most 20,015 kilometres — which is the number the midpoint failure produces, arriving as a bound rather than as a symptom.

Each of those is a statement about the sphere rather than about the data, which is what makes them checks rather than heuristics. The site’s own gate runs the first two, on a ring built to fail them, and requires the failure — because a seam check that had stopped detecting anything would leave every area on the site quietly wrong at exactly one longitude.

The checks belong at the door

The three tests above are cheap enough to run anywhere, so the interesting question is where in a system they should sit, and there is a clear answer.

At ingest, on every feature, once. Each check is a comparison against a constant the sphere supplies — half the circumference, the hemisphere’s area, 180° of longitude — so the cost is a few arithmetic operations per feature and no dataset, no index and no neighbourhood. A million features is a fraction of a second, which is nothing beside the parse that produced them.

The argument for putting them there rather than at the point of use is the shape of the failure.

A seam artefact is shape-preserving downstream. The wrong-way segment, the inverted polygon and the world-spanning bounding box are all valid geometries: they parse, they render, they intersect, they are stored and reprojected and served without complaint. Nothing later in the pipeline has a reason to look, because nothing later is broken — the data is merely wrong, and it is wrong in a way that produces a picture rather than an error.

And it propagates into everything derived from it. An area computed on the inverted polygon enters a total; a length enters a summary; a bounding box enters an index and quietly matches every query in the world. By the time somebody notices a number that looks odd, the feature that caused it is several products upstream and the audit is archaeology.

So the checks are a boundary condition on a system rather than an analysis step. A dataset that has passed them once cannot develop the defect later, because nothing downstream creates it — the failure is made at the moment coordinates are interpolated, joined or built, which is exactly the moment the data arrives.

Where this ladder goes

The failures so far have been about quantities: an area, a length, a position. The next two are about answers — which site is nearest, and what a picture becomes when it is warped into another projection — where the operation returns something that is not a number and the error is a different kind of object.

Named alongside this one

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

What links here

The 8 essays that link to this one and share the most of its objects, of 13 that link here.

The objects this essay names

Each one links to every other essay that touches it.

AntimeridianBoundaryBounding boxBranch cutClosed formConventionGraticuleInterruptionShoelaceTopologyVerification