Twelve Awkward Cells

The migration ships. The neighbour lookup allocates a fixed 7-element array for each one-ring query and asserts the returned count is 7. It runs clean for months, then a batch job over a global dataset of sensor sites trips the assertion on a handful of records. What is the explanation?

A

Cells whose centre falls in open ocean are omitted from the index, so the ring comes back short near coastlines.

B

Exactly 12 cells at every resolution are pentagons, sitting at the vertices of the underlying icosahedron, and a pentagon has only 5 neighbours.

C

Cell areas vary by roughly a factor of two within a resolution, so dense regions pack more neighbours into the same ring.

D

Cells that straddle the 180th meridian get split, so the ring is returned as two partial sets.