Datasets:
image imagewidth (px) 256 256 |
|---|
YAML Metadata Warning:The task_categories "geospatial" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
YAML Metadata Warning:The task_categories "remote-sensing" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
YAML Metadata Warning:The task_categories "elevation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
OpenZenith DEM: Global Elevation & Bathymetry Tiles
Global elevation dataset combining Copernicus GLO-30 (land) and GEBCO 2025 (ocean bathymetry) in Terrarium PNG tile format.
Dataset Description
OpenZenith DEM provides global elevation coverage as Terrarium PNG tiles organized in a standard XYZ tile pyramid. The dataset merges:
- Copernicus GLO-30 (30 arc-second, ~30m resolution) for all global landmass
- GEBCO 2025 (15 arc-second, ~450m resolution) for ocean bathymetry and land fill
The merge priority per pixel:
- Ocean (elevation < 0): GEBCO 2025 bathymetry
- Land: Copernicus GLO-30 (highest accuracy), GEBCO fallback for gaps
Terrarium Encoding
Each tile is a 256Γ256 RGB PNG with elevation encoded as:
height_meters = (R Γ 256 + G + B / 256) - 32768
This is the standard format used by MapLibre GL JS, CesiumJS, and Deck.gl for terrain visualization.
Zoom Levels
| Zoom | Resolution | Tiles | Size | Source |
|---|---|---|---|---|
| 0-3 | ~110km | 85 | 7.5MB | GEBCO only |
| 4-6 | ~14km | 4,376 | 378MB | GEBCO only |
| 7-8 | ~1.7km | 81,920 | 4.7GB | GEBCO + Copernicus land overlay |
| 9 | ~850m | 262,144 | ~14GB | GEBCO + Copernicus land overlay |
Dataset Structure
tiles/
βββ 0/
β βββ 0.png
βββ 1/
β βββ 0/
β β βββ 0.png
β βββ 1/
β βββ 0.png
βββ ...
βββ 8/
βββ 0/
β βββ 0/
β β βββ 0.png
β βββ ...
βββ ...
Usage
Python (pip install openzenith)
from openzenith import get_elevation, load_tiles
# Download tiles from HuggingFace (zoom 0-8, ~5GB)
tiles_dir = load_tiles(zoom_levels=[0, 1, 2, 3, 4, 5, 6, 7, 8])
# Query elevation at any lat/lon
elev = get_elevation(40.7128, -74.0060) # New York City
print(f"NYC elevation: {elev:.1f}m")
# Batch queries
from openzenith import get_elevation_batch
elevations = get_elevation_batch([
(40.7128, -74.0060), # New York
(35.6762, 139.6503), # Tokyo
(27.9881, 86.9250), # Mount Everest
])
Decode tiles directly
from openzenith import decode_tile, encode_tile
# Decode a Terrarium PNG tile to numpy array
with open("tiles/8/217/151.png", "rb") as f:
data = f.read()
elevation = decode_tile(data)
print(f"Shape: {elevation.shape}")
print(f"Range: {elevation.min():.1f} to {elevation.max():.1f}m")
# Encode back to PNG
png_bytes = encode_tile(elevation)
MapLibre GL JS (Web)
// Add terrain source from R2 (or local tiles)
map.addSource("dem", {
type: "raster-dem",
tiles: ["https://openzenith.pages.dev/api/dem-tile/{z}/{x}/{y}"],
tileSize: 256,
encoding: "terrarium",
maxzoom: 10,
});
map.setTerrain({ source: "dem", exaggeration: 1.2 });
CesiumJS (Web)
// Custom Terrarium terrain provider (included in openzenith/globe)
viewer.terrainProvider = createTerrariumTerrainProvider(Cesium);
API Endpoint
# Query elevation
curl "https://openzenith.pages.dev/api/elevation?lat=40.7128&lon=-74.0060"
# Get a tile
curl "https://openzenith.pages.dev/api/dem-tile/8/217/151.png" -o tile.png
# Health check
curl "https://openzenith.pages.dev/api/dem-tile?health=1"
Data Sources
| Source | Resolution | Coverage | License |
|---|---|---|---|
| Copernicus GLO-30 | 30 arc-sec (~30m) | Global land | ESA Open |
| GEBCO 2025 | 15 arc-sec (~450m) | Global (land+ocean) | CC-BY 4.0 |
Technical Details
- Tile format: 256Γ256 RGB PNG, Terrarium encoding
- Tile pyramid: Standard XYZ (Slippy Map) scheme
- Vertical datum: WGS84 ellipsoidal
- Coordinate system: EPSG:4326 (WGS84)
- NoData encoding: R=0, G=0, B=0 (decodes to NaN)
- Accuracy: Copernicus GLO-30: 3-7m RMSE; GEBCO 2025: ~100m (bathymetry)
Limitations
- Zoom 0-8 tiles are complete and verified
- Zoom 9 tiles are being generated (check dataset updates)
- Ocean bathymetry from GEBCO has lower accuracy than land elevation
- Edge tiles may contain extrapolated data from the source datasets
License
MIT License. The underlying data sources retain their own licenses:
- Copernicus GLO-30: ESA Open (free for any purpose)
- GEBCO 2025: CC-BY 4.0 (attribution required)
- Downloads last month
- 7