These routes generate, serve, merge, and remove terrain outputs for MapLibre, Cesium, and related viewers.
Tileset Lifecycle
| Method | Path | Purpose |
|---|
GET | /terrain | list terrain tilesets |
POST | /terrain/{dataset_id}/generate | generate Terrain RGB tiles from a raster |
DELETE | /terrain/{dataset_id} | delete tiles and manifest entry for a dataset |
POST | /terrain/merge | merge multiple datasets into a terrain product |
Tile Serving
| Method | Path | Purpose |
|---|
GET | /terrain/{dataset_id}/tilejson.json | TileJSON metadata for viewer integration |
GET | /terrain/{dataset_id}/tiles/{z}/{x}/{y}.png | serve unpacked XYZ terrain tiles |
GET | /terrain/{dataset_id}/mbtiles/{z}/{x}/{y}.png | serve tiles directly from MBTiles storage |
POST | /terrain/{dataset_id}/unpack-mbtiles | convert MBTiles backend into unpacked XYZ directory layout |
Mago Terrain Helpers
| Method | Path | Purpose |
|---|
GET | /terrain/mago | inspect generated mago terrain assets |
POST | /terrain/mago | run mago terrain generation |
POST | /terrain/mago/delete | remove generated mago terrain assets |
POST | /jobs/mago-terrain | queue mago terrain generation in Celery |
Notes
- Viewer-side integration normally starts from TileJSON and then pulls tile URLs from the returned template.
- Merge workflows can be synchronous in some endpoints and asynchronous in the jobs family depending on payload size and operational preference.
- Terrain generation is one of the heavier write paths in the stack, so it is a good candidate for Celery offloading during large campaigns.