Skip to main content
Version: 4.x

Directed edge mode

An H3 Directed Edge index (mode 2) represents a single directed edge between two cells (an "origin" cell and a neighboring "destination" cell). The components of the H3 Directed Edge index are packed into a 64-bit integer in order, highest bit first, as follows:

  • 1 bit reserved and set to 0,
  • 4 bits to indicate the H3 Unidirectional Edge index mode,
  • 3 bits to indicate the edge (1-6) of the origin cell,
  • Subsequent bits matching the index bits of the origin cell.

Bit layout of H3Index for directed edges

The layout of an H3Index is shown below in table form. The interpretation of the "Mode-Dependent" field differs depending on the mode of the index.

0x0F0x0E0x0D0x0C0x0B0x0A0x090x080x070x060x050x040x030x020x010x00
0x30Reserved (0)Mode (2)EdgeResolutionBase cell
0x20Base cellDigit 1Digit 2Digit 3Digit 4Digit 5
0x10Digit 5Digit 6Digit 7Digit 8Digit 9Digit 10
0x00Digit 10Digit 11Digit 12Digit 13Digit 14Digit 15