Terra MarkTerraSystem
KSA-GRF17 Equal-Area Hexagonal Grid

Location as an Integer Join Key

Terra partitions Saudi Arabia into hierarchical hexagonal cells on the Kingdom's official datum. Every coordinate resolves to a 64-bit identifier, enabling non-spatial databases to join datasets on equality with plain B-tree indexes.

1 ha

Res 8 National Base

Exactly one hectare, 107 m across flats. The standard for all national datasets.

193 M

Cells in Saudi Arabia

Res 8 cells covering 1,929,364 km² of land. Counting cells is measuring exact ground area.

×7

Lossless Rollup

Every cell divides into exactly seven child cells. Counts aggregate upwards with zero remainder.

Interactive Spatial Join Demo

See how two datasets sharing no geometry join instantly using Terra TIS keys:

Delivery Fleet Locations
FLT-10124.6877, 46.7219
FLT-10221.4858, 39.1925
Land Parcel Register
P-88224.6877, 46.7219
P-90326.4207, 50.0888
Click "Index & Join Datasets" to resolve coordinates into 64-bit TIS keys and join on equality.

Area Math Calculator

Convert ground area into exact hexagonal cell counts per resolution level:

Calculated Cell Count
50 cells

Index a Coordinate via API

curl -X POST https://terra.example.sa/v1/index \
  -H "Content-Type: application/json" \
  -d '{"res": 8, "points": [{"id": "ORD-1", "lat": 24.6877, "lon": 46.7219}]}'
{
  "res": 8, "count": 1, "failed": 0,
  "grid_version": "terra-v1.0-ksa-grf17",
  "results": [
    { "id": "ORD-1", "cell": "t108858156b1ffff8", "grid_code": "T08-11C1ATR5" }
  ]
}

Two Identifiers, Two Purpose Roles

FormatExampleBest Used For
TIS
Terra Index String
t108858156b1ffff8 Databases, APIs, SQL Joins — high-performance internal keying.
TGC
Terra Grid Code
T08-11C1ATR5 Human display, radio, verbal communication. Includes built-in checksum character.
Never store cells as JavaScript Number: Terra indices exceed JavaScript's Number.MAX_SAFE_INTEGER. Store TIS as a string across wire and database schema; use BigInt only when arithmetic is explicitly required.

Get Started

Open Map Viewer API Documentation Service Health