Yin-Yang Coordinates

A human-readable notation for Earth's surface — y·kfwqt·bmzra

Interactive map of the zones

Click anywhere on the map to see its code. Hover to preview.

Latitude
Longitude
Canonical code
Alias (other panel)
Panel membership

Implementation notes

Yin frame
geographic, central meridian 20°E (named constant)
Yang frame
related by the involution (x, y, z) ↦ (−x, z, y)
Panel window
|φ'| ≤ 55°, |λ'| ≤ 150°
North step
3.3 m — rows used of 265
East step
3.5 m · cos φ' — columns used of 265
Radius
R = 6,371 km

Canonical owner follows the primary rule of §8 (nearer panel centre in spherical distance; the two centres are antipodal, so Yin owns exactly where cos φ cos(λ − 20°) ≥ 0). The parenthetical “equivalently |φ'| is smaller” does not hold at the window's east/west rim — this implementation follows the primary rule, which is the one under which the §6.4 example y·kfwqt·bmzra is canonical. Everything runs locally in your browser; location never leaves the page.

The notation, in full

Status: working specification
Code form: one panel bit + two five-letter lowercase words
Example: y·kfwqt·bmzra

This document specifies the notation: how a location on the Earth is written, read, compared, and stored. Geometry and covering arguments are included only where they force a notational choice.

The current numeric parameters incorporate a later enlargement of the patches and panels relative to the original essay (Human_Readable_Coordinate_Code_Earth_Surface.md): peak cell side ≈ 3.5 m, panels \(\varphi' \in [-55^\circ, 55^\circ]\), \(\lambda' \in [-150^\circ, 150^\circ]\).

1. Purpose of the notation

A written location must do four things at once:

  1. Name a unique patch of a few square metres anywhere on the sphere.
  2. Be short enough to say, type, and remember (letters, not digits-plus-punctuation soup).
  3. Make nearby places look nearby and subtract: the difference of two codes in the same frame is a displacement in metres.
  4. Avoid polar collapse, zone tables, and dictionaries.

Those four constraints, taken together, determine the written form more tightly than they determine the underlying grid.

2. Information budget

Earth's surface area is about \(5.1 \times 10^{14}\,\mathrm{m}^2\). At a few square metres per patch this is a counting problem of order \(10^{14}\) identifiers, about 47 bits.

AlphabetBaseCharacters for \(\sim 10^{14}\) IDs
Decimal digits1014
Lowercase letters2610
Letters + digits369
Case-sensitive letters529
Alphanumeric, both cases628

\(26^{10} \approx 1.41 \times 10^{14} \approx 2^{47}\). Ten lowercase letters therefore sit on the information-theoretic floor. Population-weighted (Huffman) allocation of shorter prefixes to inhabited land saves less than one character: capacity grows exponentially with length, inhabited area only linearly. The notation therefore uses a fixed ten-letter payload and does not vary length by region.

Patch size is the remaining free parameter. It is chosen so that the two five-letter axes fit inside \(26^5 = 11\,881\,376\) with modest headroom after the panels have been enlarged (see §5).

3. Why the code is a pair, not a curve

A single space-filling index (Hilbert / S2, Morton / geohash) is a good database key and a poor human notation:

  • Every 2-D → 1-D map has seams. Adjacent patches can receive distant indices.
  • Arithmetic on two codes does not yield direction or distance.

Splitting the payload into an (easting, northing) pair restores subtraction:

  • difference of northings → northward displacement,
  • difference of eastings → eastward displacement,

both in metres inside a shared panel. The split costs no extra characters: the same 47 bits are merely written as two groups of five instead of one interleaved string.

The written code therefore has three fields, not one:

<panel> · <easting> · <northing>

4. Why two panels, and why they overlap

A single global lat–lon pair cannot make “one east-index step = one nearly-constant number of metres” everywhere. Meridian convergence and Gauss's Theorema Egregium forbid it. The classical escapes are:

  • keep columns aligned and global, and accept polar collapse (plate carrée);
  • keep metres constant and global, and lose column alignment (HEALPix, reduced Gaussian);
  • keep both locally and cut the sphere into many zones (UTM / MGRS).

The notation takes a fourth escape: covering instead of partition. Some points are allowed two valid written codes. Overlap costs \(\log_{26} \lambda\) characters for covering density \(\lambda\); even at \(\lambda \approx 1.36\) that is a fraction of a letter, paid by the existing panel-bit rather than by lengthening the words.

The payoff is a theorem about the written codes: if every point lies a distance \(W\) inside at least one panel (the Lebesgue number of the covering), then any two points within \(W\) of each other share a panel and therefore have codes that subtract correctly. Comparability of nearby addresses becomes a design parameter, not a hope.

The notational price is that string equality is no longer location equality. Storage must canonicalize first (§8).

5. The two frames

The covering is a Yin–Yang pair (Kageyama & Sato, 2004): two congruent mid-latitude lat–lon panels, rotated 90° relative to each other.

Involution. Yin and Yang Cartesian frames are related by the self-inverse permutation

\[ (x, y, z) \;\mapsto\; (-x,\; z,\; y). \]

Users learn two congruent charts and one involution. The panel field of the notation is the single bit that names which chart the two words live in.

Current panel window (enlarged from the original \(\pm 45.5^\circ / \pm 135.5^\circ\)):

\[ \varphi' \in [-55^\circ,\; 55^\circ], \qquad \lambda' \in [-150^\circ,\; 150^\circ]. \]

Each panel is about 68 % of the sphere; the two together cover the sphere with roughly 36 % overlap. Neither panel contains its own coordinate poles, so \(\cos\varphi'\) only ranges from 1 down to \(\cos 55^\circ \approx 0.57\). Convergence is clipped, not eliminated.

Grid inside a panel. Fixed column count (columns align; east indices are comparable across rows):

AxisStepSpan usedFit in \(26^5\)
Northing\(\approx 3.3\,\mathrm{m}\) \(110^\circ \approx 12\,230\,\mathrm{km}\) \(\sim 3.7\times 10^6\) rows, \(\sim 3.2\times\) headroom
Easting at panel equator\(3.5\,\mathrm{m}\) \(300^\circ \approx 33\,350\,\mathrm{km}\) \(\sim 9.5\times 10^6\) columns, \(\sim 1.25\times\) headroom

East step shrinks as \(\cos\varphi'\) toward the panel edges (\(\approx 2.0\,\mathrm{m}\) at \(\varphi' = \pm 55^\circ\)). Cell area therefore ranges about \(9\)–\(12\,\mathrm{m}^2\). That is coarser than the original 4–5.7 m² window; the extra metres per step were spent on larger panels and a thicker overlap, not on a longer code.

Offsets are measured from the panel's southwest corner \((\lambda',\varphi') = (-150^\circ,-55^\circ)\).

Free orientation. Rotation of the Yin frame about the geographic axis is an aesthetic parameter, not part of the alphabet. A convenient default places Yin's central meridian near \(20^\circ\mathrm{E}\), so most of Africa, Europe, southern/central Asia, and the Americas at modest latitude sit in Yin, while Yang owns both geographic poles, high latitudes, and the central Pacific. The visualisation yin_yang_globe.html exposes this rotation as a continuous slider; the written notation does not record it. Implementations must agree on one fixed orientation.

6. Written form

6.1 Alphabet

  • Payload characters are the 26 lowercase Latin letters az.
  • Case is not significant for identity; canonical writing is lowercase.
  • The three fields are separated by a middle dot · (U+00B7) in display form. Implementations must also accept ASCII . or a space as separators on input.
  • No dictionary, no check character, no mixed alphanumeric.

6.2 Panel bit

The panel field is a single letter:

GlyphPanelMnemonic
yYinyin
gYangyang (the unused letter next to y in “yang”)

Any other first character is invalid. The panel letter is not part of the base-26 arithmetic; it only names the frame.

6.3 Five-letter words

Each of easting and northing is a five-letter string encoding an integer in \([0, 26^5)\):

\[ n = \sum_{i=0}^{4} c_i \, 26^{4-i}, \qquad c_i = \mathrm{ord}(letter_i) - \mathrm{ord}(\texttt{a}). \]

Leading as are significant and must be written (aaaaa is the southwest corner, not an empty field).

Suggested grouping for speech: the five letters of a field may be read as a single nonce word. The two fields are distinct words.

6.4 Full written examples

y·kfwqt·bmzra     Yin,  easting kfwqt, northing bmzra
g·kfwqt·bmzra     Yang, same numeric offsets — a different place
y·aaaaa·aaaaa     Yin southwest corner

Compact form (no separators, 11 characters): ykfwqtbmzra.
Parsers accept compact form when the string is exactly 11 lowercase letters and the first is y or g.

6.5 What is not written

  • Hemisphere letters, zone numbers, datum codes, or projection names.
  • Units. The implied unit of an index step is metres, with the east scale equal to \(3.5\,\mathrm{m}\times\cos\varphi'\) (see §7).
  • The second (alias) code of an overlap point. Display may show both; the notation of record is the canonical one (§8).

7. Arithmetic on two codes

Let two codes share a panel letter. Write their integer eastings and northings as \((E_1, N_1)\) and \((E_2, N_2)\). Then

\[ \Delta N = (N_2 - N_1)\, s_N, \qquad s_N \approx 3.3\,\mathrm{m}, \]

is the northward displacement, independent of row.

\[ \Delta E = (E_2 - E_1)\, s_E(N), \qquad s_E(N) = 3.5\,\mathrm{m}\times \cos\varphi'(N), \]

is the eastward displacement along that row. Across rows thousands of kilometres apart, \(s_E\) drifts by up to \(\sim 43\%\) (\(1 \to \cos 55^\circ\)). That drift is the residue of curvature two charts cannot remove. It is a one-parameter function of the northing and is ignored for mental arithmetic inside a town or work site — the regime the Lebesgue margin is sized for.

Codes that do not share a panel letter are not subtracted. Convert one into the other frame via the involution, or move to the shared panel that the covering guarantees for points within the design margin.

8. Canonicalization and aliases

A point in the overlap has two well-formed written codes. Both are valid for speech and navigation. For storage, joins, and identity:

A point is owned by the panel whose centre is nearer in spherical distance (equivalently: the panel in which \(|\varphi'|\) is smaller). The other writing is an alias.

This is a closed-form computation — evaluate the point in both frames through the involution, compare \(|\varphi'|\) — not a lookup table. Ties on the exact mid-set may be broken by preferring Yin.

Ingestion rule: every incoming string is parsed, decoded to a point, re-encoded in the owning panel, and stored as that canonical string. Display layers may re-attach the alias.

9. Parsing and validation

A well-formed code satisfies all of:

  1. Panel character is y or g.
  2. Easting and northing are each exactly five letters az.
  3. The implied integers lie in the used range of the panel (implementation-defined headroom may reject values past the northeast corner).
  4. After decoding, the point lies inside that panel's window, including the overlap.

Anything else is rejected, not “repaired.” Compact 11-letter form is first rewritten as p·eeeee·nnnnn and then validated.

10. Properties and costs of the written system

Achieved

  • Ten lowercase letters plus one bit — on the 47-bit floor, even after the panels were enlarged.
  • Nearby patches receive nearby strings inside a panel, and those strings subtract to metres.
  • Any two points well inside the thickened overlap share a frame; local mental arithmetic is then always defined.
  • No polar glyphs, no zone prefix tables, no word list.
  • Two congruent frames and one involution.

Costs

  • East-step intuition drifts with northing (up to \(\sim 43\%\) at panel edges). Exact correction is \(\cos\varphi'(N)\).
  • String equality is not location equality. Every store path canonicalizes.
  • The enlarged panels push \(\cos\varphi'\) down to \(\approx 0.57\), a worse clip than the original \(0.70\). That is the explicit trade for a thicker overlap and a coarser \(\sim 3.5\,\mathrm{m}\) peak step.

11. Specification at a glance

ItemValue
CoveringTwo congruent panels, Yin and Yang, related by \((x,y,z)\mapsto(-x,z,y)\)
Panel window\(\varphi' \in [-55^\circ,55^\circ]\), \(\lambda' \in [-150^\circ,150^\circ]\)
Alphabet26 lowercase letters; display separator ·
Written formy or g, then 5-letter easting, then 5-letter northing
OriginSouthwest corner of the named panel
North step\(\approx 3.3\,\mathrm{m}\)
East step\(3.5\,\mathrm{m}\times\cos\varphi'\)
Cell area\(\approx 9\)–\(12\,\mathrm{m}^2\)
Canonical ownerPanel with smaller \(\lvert\varphi'\rvert\)
Identifier space\(2 \times 26^{10} \approx 2.8 \times 10^{14}\)

12. Related notations (why they were not adopted)

  • MGRS / UTM — the ancestor of the pair-with-prefix form. Requires 60 zones and a grid-zone designator; the present notation replaces the zone table with two overlapping charts.
  • Maidenhead, GEOREF — lettered pairs, but far coarser and still lat–lon-pathological at the poles.
  • Plus Codes / Open Location Code — short and public, but the code is a hierarchical area label; subtraction is not metres.
  • what3words — three dictionary words; locality is deliberately destroyed.
  • Geohash, S2, H3 — excellent indexes, not spoken coordinate pairs.

13. Implementation notes

  • Decode order: parse → integers \((E,N)\) → metres from the southwest corner → \((\lambda',\varphi')\) in the named frame → geographic \((\lambda,\varphi)\) via the inverse involution if the panel is Yang.
  • Encode order: geographic point → both frames → choose owner (§8) → metres → integers → letters.
  • The default Yin central meridian (\(20^\circ\mathrm{E}\)) must be a named constant shared by all encoders. Changing it changes every written code.
  • Interactive inspection of panel placement lives in yin_yang_globe.html and is not part of the notation.

14. Revision note

The original essay used a \(\approx 2.26\,\mathrm{m}\) north step, \(\approx 2.54\,\mathrm{m}\) equatorial east step, and panels extended only \(0.5^\circ\) past the classical Yin–Yang window. The present notation spends that unused \(26^5\) headroom, plus a deliberate coarsening of the peak cell side to \(\approx 3.5\,\mathrm{m}\), on a larger window and a thicker overlap. The written grammar — one bit, two five-letter words, middle-dot separators, nearer-centre canonicalization — is unchanged.

← Back to Games