How Bgrid Works
The Core Concept
BGrid transforms continuous geographic coordinates (Latitude, Longitude) into a discrete, hierarchical address.
Instead of arbitrary numbers, we use the BIP39 wordlist (2048 words) to encode location. This means every “cell” in our grid is identified by a single word.
To address the entire world with precision, we nest these grids.
Level 1: The Global Grid
The world is projected onto a 2D plane ( normalized to ). We divide this plane into 2048 cells.
Why ? The Earth is twice as wide (360° Longitude) as it is tall (180° Latitude). By using twice as many columns as rows, each cell remains roughly square near the equator.
Level 2: Refinement
Inside each Level 1 cell, we divide again by 2048. However, to maintain aspect ratio and precision, we swap the dimensions:
This alternating strategy ensures that errors don’t accumulate in one dimension.
The Algorithm
Given a coordinate :
-
Normalize:
-
Iterate (for each level ):
-
Determine dividers:
- If is odd:
- If is even:
-
Calculate Cell Column and Row:
-
Calculate Index (1-2048):
-
Zoom in (update to be relative to current cell):
-
This process repeats until the desired precision is reached.
- Level 4 gives accuracy within meters (comparable to GPS for navigation).
Why BIP39?
The BIP39 standard defines a list of 2048 distinct, memorable words. It was designed for Bitcoin seed phrases, but it’s perfect for coordinates because:
- Error Correction: Words are chosen to be distinct (first 4 letters are unique).
- Global Support: Wordlists exist for English, Spanish, French, Chinese, etc.
- Human Friendly: “Apple” is easier to remember than “10010011”.