Cell
A cell is a square of fixed size in metres for its country. Every point falls in exactly one cell at each level.
Level
The level sets the cell size. Level 0 is the root, 50,000 km per side. Each finer level makes cells smaller. The engine returns an empty GID for level 0, so use level 1 or finer for IDs. These sizes come from cellSideM in the engine build:
| Level | Cell side |
|---|---|
| 0 | 50,000 km |
| 8 | 5 km |
| 10 | 500 m |
| 12 | 50 m |
| 13 | 10 m |
| 14 | 5 m |
Levels 13 and 14 are the finest. Going from level 12 to 13 gives 25 children. Going from 13 to 14 gives 4.
GID
A GID is the text code of one cell, such as H2X545M5X4E2. It has one character per level, so a level 12 GID has 12 characters. A GID is the same string in Python, the browser and DuckDB.
Domain
A domain is the country code the cell belongs to, such as ID. In the packed form, a domain ID number and a GID join into one 64-bit integer.
URI
Store the full URI, not the bare GID. It looks like geosquare:v2:ID:H2X545V39. The domain is part of the URI, so the same GID in two countries stays distinct.
Country profile
A profile names the datum and projection for one domain. Profiles are signed in a registry. Released domains are BN, ID, LA, MY, PH and SG. KH, MM, TH, TL and VN are candidate profiles. Candidate use needs an opt-in flag.
Pyramid levels
Zoom rollups use levels 8, 10 and 12. Those levels are the ones the data pyramid holds. The zoom rollup playground shows how the level changes with the map zoom.