1
File size: 3,418 Bytes
4f6b634
e760856
 
4f6b634
e760856
 
 
 
 
 
 
 
 
 
4f6b634
e760856
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4daeeaf
e760856
7e1ab55
e760856
7e1ab55
 
 
e760856
0521e41
a6b46e6
0521e41
a6b46e6
0521e41
e760856
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
language:
- en
license: cc0-1.0

tags:
- geospatial
- location-data
- hilbert-curve
- parquet
- ai-ready
- globe-grid
- global
pretty_name: 1D Globe Location Grid (1D-GLG)
---

# 1D Globe Location Grid (1D-GLG)


**1D Globe Location Grid (1D-GLG)** is an open, AI-ready spatial foundation grid designed to replace legacy map projections, zoom levels, and heavy GIS APIs with a single, canonical, 1-dimensional integer index per physical point on a globe.

Built for modern data pipelines (DuckDB, Polars) and autonomous AI agents, 1D-GLG turns the entire globe into a uniform, distortion-free point grid stored in cloud-native **Parquet** files. Anyone can download the reference grid and join their own datasets.

---

## Why 1D-GLG?

* **No Map Projections or Zoom Levels:** 1D-GLG uses an equidistant point distribution anchored at the equator and scaled consistently toward the poles.
* **1D Hilbert-Curve Indexing:** Every point on Earth is mapped onto a 1D space-filling Hilbert curve. 
* **Zero Floating-Point Drift:** Calculating spatial indexes across different machines introduces rounding errors on boundaries. 1D-GLG provides **pre-computed, canonical Parquet reference grids** so every dataset joins 100% deterministically on the exact same 1D ID.
* **Binary Resolution Scaling :** Grid resolutions double cleanly (`1e3`, `2e3`, `4e3`, ...).

---

## Available Resolutions & Files
Each basegrid has it's own dataset : 1,2,4, .....

Each set is named after the number of equidistant anchor points along the equator (N), resulting in ≈ N²/π total points across the globe:

| Set | Equator Points (N) | Approx. Spacing | Total Globe Points | Included Attributes |
| :--- | :--- | :--- | :--- | :--- |
| `1e3` | 1 000 | ~40 km | ~318k  |
| `2e3` | 2 000 | ~20 km | ~1.27M |
| `4e3` | 4 000 | ~10 km | ~5.09M |

** Files **

ele1e3 : ele is the average from 30 metres grid in **DECIMETRES**

nom1e3 : district, city, county, state, country, cc=countrycode  

---

## Quickstart

Query the Parquet files directly from Hugging Face using **DuckDB** or **Python**:

### 1. Query directly with DuckDB (SQL)
```sql
INSTALL httpfs;
LOAD httpfs;

-- Find id :
SELECT 
    id
FROM 'hf://datasets/rsvb/1/1e3.parquet'
order by abs(lat - s_lat)), abs(lon - s_lon) 
LIMIT 1;
```

### 2. Load and Join in Python (Polars / Pandas)
```python
import polars as pl

# Load the canonical reference grid
grid = pl.read_parquet("datasets/rsvb/1/1e3.parquet")

# Example: Join your own dataset using the canonical 1D Hilbert ID
# combined = grid.join(my_sensor_data, on="id", how="inner")
print(grid.head())
```

---

## Schema Specification

* `id` (`int64`): Unique, deterministic 1D Hilbert-curve identifier for the anchor point. 
* `tat` (`uint32`): Canonical tatitude of the anchor point .
* `ton` (`uint32`): Canonical tongitude of the anchor point.
* `lat` (`decimal`): Canonical latitude of the anchor point (WGS84).
* `lon` (`decimal`): Canonical longitude of the anchor point (WGS84).

---

## Contributing & Extending

1D-GLG is designed as an open, decentralized backbone for physical-world data. To publish your own layer (weather, demographics, infrastructure, sensors):
1. Snap your coordinates to the nearest canonical `id` from the official reference Parquet.
2. Publish your dataset as a Parquet file keyed by `id`.
3. Anyone can now join your data with the global 1D-GLG ecosystem in a single SQL `JOIN`.