The service publishes both Cesium layer.json
and TileJSON, so Cesium and MapLibre each configure themselves
from a single URL. No tokens, no signup — just the path.
Plug Re:Earth Terrain into
Navara
— a WebGL-powered 3D globe renderer. Use
MAPBOX_ELEVATION_DECODER for the Mapbox
Terrain-RGB pixel encoding.
// Navara — Mapbox Terrain-RGB view.addLayer({ type: "terrain", data: { url: "https://terrain.reearth.land/mapbox/elevation/{z}/{x}/{y}.png" }, rasterTerrain: { elevationDecoder: MAPBOX_ELEVATION_DECODER(), maxZoom: 15, }, }); // Navara has no attribution UI — display these credits yourself: // Re:Earth Terrain · Mapterhorn (CC BY 4.0) // + Protomaps · © OpenStreetMap contributors (ODbL) if the water mask is on
Same content, Terrarium pixel encoding. Use
TERRARIUM_ELEVATION_DECODER when your pipeline
already speaks Terrarium (Mapzen, AWS Open Terrain Tiles,
…).
// Navara — Terrarium view.addLayer({ type: "terrain", data: { url: "https://terrain.reearth.land/terrarium/elevation/{z}/{x}/{y}.png" }, rasterTerrain: { elevationDecoder: TERRARIUM_ELEVATION_DECODER(), maxZoom: 15, }, }); // Navara has no attribution UI — display these credits yourself: // Re:Earth Terrain · Mapterhorn (CC BY 4.0) // + Protomaps · © OpenStreetMap contributors (ODbL) if the water mask is on
Point CesiumTerrainProvider.fromUrl at the
endpoint — extensions like vertex normals and the water
mask are advertised in layer.json and
negotiated automatically.
// CesiumJS — quantized-mesh-1.0 const terrain = await Cesium.CesiumTerrainProvider.fromUrl( "https://terrain.reearth.land/cesium-mesh/ellipsoid", { requestVertexNormals: true, requestWaterMask: true } ); const viewer = new Cesium.Viewer("cesium", { terrainProvider: terrain });
Reach for this when you specifically need ellipsoidal heights — for ordinary 2.5D hillshade, Mapterhorn is the better default.
// MapLibre GL JS — Mapbox Terrain-RGB map.addSource("terrain", { type: "raster-dem", url: "https://terrain.reearth.land/mapbox/ellipsoid/tilejson.json", }); map.setTerrain({ source: "terrain" });
Same content, different pixel encoding. Use this when your toolchain already speaks Terrarium (Mapzen, AWS Open Terrain Tiles, deck.gl, …).
// MapLibre GL JS — Terrarium map.addSource("terrain", { type: "raster-dem", url: "https://terrain.reearth.land/terrarium/ellipsoid/tilejson.json", encoding: "terrarium", }); map.setTerrain({ source: "terrain" });
deck.gl's TerrainLayer reads Terrarium-encoded
tiles directly — hand it the decoder constants and it meshes
the DEM on the GPU.
// deck.gl — TerrainLayer (Terrarium) new TerrainLayer({ elevationData: "https://terrain.reearth.land/terrarium/elevation/{z}/{x}/{y}.png", elevationDecoder: { rScaler: 256, gScaler: 1, bScaler: 1 / 256, offset: -32768 }, }); // deck.gl has no attribution UI — display these credits yourself: // Re:Earth Terrain · Mapterhorn (CC BY 4.0) // + Protomaps · © OpenStreetMap contributors (ODbL) if the water mask is on
Drape regular elevation tiles over a Cesium globe and the terrain lands tens of meters off where the renderer thinks the planet's surface is. Mt. Fuji's 3,776 m above sea level sits about 37 m below the point the globe is actually drawing — because sea-level heights were never measured against the smooth WGS84 ellipsoid that 3D Earth uses. They were measured against the lumpy shape of mean sea level: the geoid.
NGA's EGM2008 publishes the offset between geoid and ellipsoid as a grid (−106 m to +85 m worldwide). Add it to a sea-level height and you get the ellipsoidal height a 3D globe needs.
Re:Earth Terrain does that per request, in whatever wire format your renderer expects — so ellipsoidal-height datasets like Japan's PLATEAU 3D city models drop in with buildings already sitting on the ground. Three knobs at the URL, all from one upstream DEM and geoid.
quantized-mesh-1.0 ships
TMS-Geographic meshes for Cesium, with optional vertex
normals and a 256×256 water mask. Raster
(mapbox or
terrarium pixel encoding)
packs heights into PNG/WebP tiles for MapLibre, Mapbox GL,
and anything else that already speaks raster-DEM.
Pick the surface heights are measured against:
ellipsoid for 3D globes
and anything fed by GNSS,
elevation for hiking maps
and sea-level overlays. Same DEM, same geoid — the path
decides how they're blended.
The geoid data type
returns the EGM2008 undulation by itself — handy for
client-side conversion or visualizing the surface
directly.
/mapbox/geoid/tilejson.json
Most bytes are served from our own R2 mirror. EGM2008 ships as a COG in R2 from day one, the Protomaps water mask is snapshotted monthly into R2, and Mapterhorn planet tiles (z ≤ 12) are mirrored to R2 — higher zooms are mirrored progressively, with any not-yet-mirrored areas falling back to the upstream Mapterhorn endpoint over HTTPS. The attributions below are injected into TileJSON and Cesium layer.json so your clients display them automatically.
Re:Earth Terrain is operated by Eukarya, Inc. as part of the Re:Earth ecosystem. It started as the terrain backend for Re:Earth, our open-source 3D mapping platform, and we run it openly because the data and tools we build on — OpenStreetMap, Mapterhorn, EGM2008 — are themselves open.
The compute runs on Cloudflare Workers, with R2 holding both the source datasets and a content-addressed tile cache. The project's own code is MIT-licensed and lives on GitHub.
By design, source datasets are mirrored into R2, but the tiles we serve — quantized-mesh, raster terrain, the water mask attached to a mesh — are assembled on demand from those sources. There is no batch re-tile pipeline and we don't publish pre-rendered tile archives; refreshing a mirror is enough for new data to show up in the next request. How on-demand tile generation works ↗
Best-effort uptime, no SLA, no signup, no API key. We may add rate limits without notice if a single client starts dominating traffic — the goal is keeping the service usable for everyone, not gating access.
The code is MIT, but the data licenses ride along with the tile bytes. The runtime ships every required attribution in TileJSON / layer.json, so wiring up the service with its defaults is usually enough.
If you're surfacing credits outside that flow, the minimum line is:
Re:Earth Terrain · Mapterhorn (CC BY 4.0)
Append when the water mask is enabled:
Protomaps · © OpenStreetMap contributors (ODbL)
Not a production SaaS with an SLA, and not a guaranteed dataset for safety-critical work. If you need either, host the upstream sources yourself — or reach Eukarya at info@eukarya.io.