How it works
Suppose the Republic of Heard Island decreed that every COG and Zarr store must be mapped onto a
penguin: a king penguin (they breed on Heard) with the earth's volume, about 21,000 km tall, with
Mawson Peak at longitude 0, latitude 0 in the middle of its belly.
A datum is a surface that longitude and latitude are drawn on. An ellipsoid has a formula for
the point at each lon/lat; a penguin needs a rule. Take the one planetary science uses for irregular bodies such as asteroids
(IAU planetocentric coordinates):
a lon/lat is a direction from the body's centre of mass, and the surface in that direction is
where the ray from the centre leaves the body. The surface is then a raster of radius against
lon/lat, which is how lunar and planetary shape models are often stored, and every raster in "Penguin
CRS" is a lon/lat grid like any other.
That rule needs the body to be star-shaped from its centre: each ray must leave it once.
A penguin is not. The ray up through the chin leaves the head and enters the beak; rays out to
the side leave the body and enter a half-raised flipper; rays down to the front leave the belly
and enter the feet. Those directions have two or more exits ("Exits along the ray"), and the
decree has to pick one. It takes the last, so the surface it describes shrink-wraps the bird:
the underside of the beak, the inside of the flippers and the tops of the feet are on no ray's
last exit, so no lon/lat reaches them ("What the decree reaches", red), and the radius jumps at
the edges of the overhangs, a cliff in the raster where the true surface folds back. Press the
flippers flat, tuck the feet in and take off the beak and the penguin is star-shaped: one exit
everywhere, nothing unreached, and the cells add up to the bird's whole surface.
The area of a lon/lat cell on any star-shaped surface is r² / cos(a) times the cell's
solid angle, where r is the radius and a the angle between the ray and the surface normal; it is
shown against the same cell on the sphere of equal volume. A cell is big where the penguin is far
from its centre (the crown, the toes) and huge where the ray grazes the surface (the sides of the
beak, the edges of the flippers), where a in that formula goes to 90 degrees. A COG or Zarr array
in penguin lon/lat has equal cells in index space and wildly unequal cells on the bird.
Penguin undulation is the penguin's radius minus the WGS84 ellipsoid's in the same
earth direction, the penguin's answer to the geoid's N (see the Geoid
page): thousands of kilometres, not tens of metres. The readout says how far Mawson Peak, on the
belly, stands off the penguin.
PROJ cannot hold the penguin. A geodetic CRS in PROJ, GeoTIFF or CF names an ellipsoid or a
sphere, so the decree is two things: a rotation of the sphere of the earth's volume that puts
Heard Island at 0, 0 (PROJ's ob_tran, written out as PROJJSON and checked against
PROJ in test/check-penguin.mjs), and a radius grid in those coordinates, which is
what the GeoTIFF download holds (radius, number of exits and cell area factor, one degree, in a
geographic CRS on that sphere; the rotation is in the file's citation, which GeoTIFF has no key
for). The penguin is a smooth union of ellipsoids (its field and mesh are in
src/core/penguin.js); its surface is drawn by surface nets, and each ray is traced
through the field and its crossings refined by bisection.
Hash keys: beak, flip, feet, orient
(heard or greenwich), col, lay,
cell, grid, coast, nod, sph,
plon, plat (the ray), bm, cam.
- Archinal, B. A. et al. (2018) Report of the IAU Working Group on Cartographic Coordinates and
Rotational Elements: 2015, Celest. Mech. Dyn. Astr. 130, 22 (planetocentric coordinates and
irregular bodies).
- Pole rotation by PROJ's ob_tran;
surface nets after Gibson, S. F. F. (1998) Constrained elastic surface nets, MICCAI'98, LNCS 1496.
- Coastlines and countries from Natural Earth;
drawn with three.js. No penguins were consulted.