{"id":36704773,"url":"https://github.com/tum-gis/cesium-terrain-builder-docker","last_synced_at":"2026-01-12T11:41:42.498Z","repository":{"id":38421806,"uuid":"143696100","full_name":"tum-gis/cesium-terrain-builder-docker","owner":"tum-gis","description":"Dockerfile for the geo-data/cesium-terrain-builder app with quantized mesh support.","archived":false,"fork":false,"pushed_at":"2023-08-06T09:38:46.000Z","size":69,"stargazers_count":190,"open_issues_count":4,"forks_count":50,"subscribers_count":14,"default_branch":"main","last_synced_at":"2024-05-10T22:05:52.471Z","etag":null,"topics":["cesium","cesium-terrain","cesiumjs","docker","docker-image","quantized-mesh","terrain","terrain-generation"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tum-gis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-06T08:05:02.000Z","updated_at":"2024-05-10T21:35:50.000Z","dependencies_parsed_at":"2023-01-30T04:15:34.320Z","dependency_job_id":null,"html_url":"https://github.com/tum-gis/cesium-terrain-builder-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tum-gis/cesium-terrain-builder-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tum-gis%2Fcesium-terrain-builder-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tum-gis%2Fcesium-terrain-builder-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tum-gis%2Fcesium-terrain-builder-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tum-gis%2Fcesium-terrain-builder-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tum-gis","download_url":"https://codeload.github.com/tum-gis/cesium-terrain-builder-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tum-gis%2Fcesium-terrain-builder-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cesium","cesium-terrain","cesiumjs","docker","docker-image","quantized-mesh","terrain","terrain-generation"],"created_at":"2026-01-12T11:41:39.425Z","updated_at":"2026-01-12T11:41:42.491Z","avatar_url":"https://github.com/tum-gis.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cesium Terrain Builder Docker\n\nThis repo contains a `Dockerfile` for the [Cesum Terrain Builder (CTB)](https://github.com/geo-data/cesium-terrain-builder)\napp with support for the new Cesium terrain format *quantized-mesh*. It is build from a\n[fork](https://github.com/ahuarte47/cesium-terrain-builder/tree/master-quantized-mesh)\nproviding quantized-mesh support, as described in this\n[artice](https://www.linkedin.com/pulse/fast-cesium-terrain-rendering-new-quantized-mesh-output-alvaro-huarte/).\nInformation on the most recent development of this fork is available in this\n[pull request](https://github.com/geo-data/cesium-terrain-builder/pull/64).\nThanks to [@homme](https://github.com/homme) and [@ahuarte47](https://github.com/ahuarte47)\nfor the great work on Cesium Terrain Builder and quantized-mesh support.\n\n\u003e **Note:** The images are manually rebuild, when new commits are published at\n\u003e [ahuarte47/cesium-terrain-builder/tree/master-quantized-mesh](https://github.com/ahuarte47/cesium-terrain-builder/tree/master-quantized-mesh).\n\u003e If you miss an update in an image, please let us know by creating an\n\u003e [issue](https://github.com/tum-gis/cesium-terrain-builder-docker/issues).\n\nIf you experience problems or want to contribute please create an\n[issue](https://github.com/tum-gis/cesium-terrain-builder-docker/issues)\nor [pull request](https://github.com/tum-gis/cesium-terrain-builder-docker/pulls).\n\nFollow the steps below to create your own quantized-mesh tiles for Cesium using this Docker image.\n\n## News\n\n* 2023-08-06:\n  * The additional `arm64` image ins now available from both\n    [Dockerhub](https://hub.docker.com/r/tumgis/ctb-quantized-mesh) and\n    [Github packages](https://github.com/tum-gis/cesium-terrain-builder-docker/pkgs/container/ctb-quantized-mesh).\n\n    `docker pull ghcr.io/tum-gis/ctb-quantized-mesh:latest`\n\n    `docker pull ghcr.io/tum-gis/ctb-quantized-mesh:alpine`\n\n* 2023-07-31:\n  * An additional `arm64` version of the image was added. This currently untested and I'm happy for\n    any feedback on this, see tum-gis/cesium-terrain-builder-docker#19. The `arm64` Docker images are hosted in\n    [Github packages](https://github.com/tum-gis/cesium-terrain-builder-docker/pkgs/container/ctb-quantized-mesh).\n\n    `docker pull ghcr.io/tum-gis/ctb-quantized-mesh:latest`\n\n    `docker pull ghcr.io/tum-gis/ctb-quantized-mesh:alpine`\n\n* 2023-03-06:\n\n  * Updated both images to reflect latest changes in\n [ahuarte47/cesium-terrain-builder:master-quantized-mesh](https://github.com/ahuarte47/cesium-terrain-builder/tree/master-quantized-mesh)\n  * Updated GDAL to 2.4.0 in `latest` image\n\n* 2020-11: Updated ``alpine`` image to Alpine v3.12 and GDAL v3.14\n\n* 2020-11: Reduced size of all images using multi stage builds.\n\n## Image variants\n\nThe `amd64` Docker images are available on DockerHub from [tumgis](https://hub.docker.com/r/tumgis/) or from\n[Github packages](https://github.com/tum-gis/cesium-terrain-builder-docker/pkgs/container/ctb-quantized-mesh).\nTo get the image run:\n\n`docker pull tumgis/ctb-quantized-mesh:\u003cTAG\u003e` or\n`docker pull ghcr.io/tum-gis/ctb-quantized-mesh:\u003cTAG\u003e`\n\nThe `arm64` Docker images are ONLY available from\n[Github packages](https://github.com/tum-gis/cesium-terrain-builder-docker/pkgs/container/ctb-quantized-mesh).\nTo get the image run:\n\n`docker pull ghcr.io/tum-gis/ctb-quantized-mesh:\u003cTAG\u003e`\n\nFollowing tags are available:\n\n| Tag        |                                                                                                                                                       Build status                                                                                                                                                       | Arch            | Description                                                   |\n|------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|-----------------|---------------------------------------------------------------|\n| ``latest`` |             [![Build Status](https://travis-ci.com/tum-gis/cesium-terrain-builder-docker.svg?branch=master)](https://travis-ci.com/tum-gis/cesium-terrain-builder-docker) ![Build status](https://img.shields.io/github/actions/workflow/status/tum-gis/cesium-terrain-builder-docker/docker.yml?logo=docker)            | `amd64` `arm64` | Latest image build based on Debian and GDAL 2.4.0             |\n| ``alpine`` | [![Build Status](https://travis-ci.com/tum-gis/cesium-terrain-builder-docker.svg?branch=alpine)](https://travis-ci.com/tum-gis/cesium-terrain-builder-docker) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/tum-gis/cesium-terrain-builder-docker/docker.yml?logo=docker) | `amd64` `arm64` | Image based on leightweight Alpine Linux v3.12 and GDAL v3.14 |\n\n## Content\n\n- [Cesium Terrain Builder Docker](#cesium-terrain-builder-docker)\n  - [News](#news)\n  - [Image variants](#image-variants)\n  - [Content](#content)\n  - [Preparation](#preparation)\n    - [Docker settings](#docker-settings)\n    - [Data pre-processing](#data-pre-processing)\n    - [Data storage](#data-storage)\n  - [Cesium Terrain Builder usage](#cesium-terrain-builder-usage)\n    - [Start CTB container and mount data folder](#start-ctb-container-and-mount-data-folder)\n      - [Linux - `bash`](#linux---bash)\n      - [Windows - `cmd`](#windows---cmd)\n      - [Windows - `git-bash`](#windows---git-bash)\n      - [Windows - `powershell`](#windows---powershell)\n    - [Create a GDAL Virtual Dataset (optional)](#create-a-gdal-virtual-dataset-optional)\n    - [Create Cesium Terrain files](#create-cesium-terrain-files)\n    - [Create Cesium layer description file](#create-cesium-layer-description-file)\n  - [Troubleshooting](#troubleshooting)\n    - [Performance issues](#performance-issues)\n    - [Handling large datasets](#handling-large-datasets)\n\n## Preparation\n\n### Docker settings\n\nThe system resources Docker can use are limited by default on Windows systems.\nGoto *Docker tray Icon* -\u003e *Settings* -\u003e *Advanced* to adjust the *number of cores*\nand *main memory* Docker can use to increase performance.\n\n### Data pre-processing\n\nIt is highly recommended (but not required) to transform your data to the\n*WGS84* (EPSG:4326) coordinate reference system before using CTB. This helps to avoid\nvertial or horizontal offsets of terrain datasets. Use the `NTv2` transformation method\nif available. This is e.g. supported by [FME](https://www.safe.com/)\nusing the `EsriReprojector` transformer or  [ESRI ArcGIS](https://www.arcgis.com/index.html).\n\n### Data storage\n\nPut your data in a folder, that can be mounted by Docker. On Windows,\nyou will have to grant access to the drive where the data is located\nbefore being able to mount the folder. Goto *Docker tray Icon* -\u003e *Settings* -\u003e\n*Shared Drives* to share drives with Docker. Visit this\n[blog post](https://rominirani.com/docker-on-windows-mounting-host-directories-d96f3f056a2c)\nfor a comprehensive guide on mounting host directories on Windows.\n\nIn the following we assume that your terrain data is stored in `d:\\docker\\terrain`\nfor a Windows Docker host and drive `d:\\` is shared with Docker.\nFor a Linux Docker host we assume your data is stored in `/docker/terrain`.\n\n## Cesium Terrain Builder usage\n\nWhen your data is transformed and copied to a location available for Docker your\nare ready for creating a Cesium terrain with CTB.\n\n### Start CTB container and mount data folder\n\nBefore starting CTB it is recommended to pull the latest image version using\n`docker pull tumgis/ctb-quantized-mesh`.\nAfter that, start a CTB container and mount your terrain data folder to `/data` in the container.\nFollow the examples below for different operating systems and shells.\n\n#### Linux - `bash`\n\n```bash\ndocker run -it --name ctb \\\n    -v \"/docker/terrain:/data\" \\\n  tumgis/ctb-quantized-mesh\n```\n\n#### Windows - `cmd`\n\n```sh\ndocker run -it --name ctb ^\n    -v \"d:/docker/terrain:/data\" ^\n  tumgis/ctb-quantized-mesh\n```\n\n#### Windows - `git-bash`\n\n```sh\nwinpty docker run --rm -it --name ctb \\\n    -v \"d:\\\\docker\\\\terrain:/data\" \\\n  tumgis/ctb-quantized-mesh\n```\n\n#### Windows - `powershell`\n\n```powershell\ndocker run -it --name ctb `\n    -v \"d:\\docker\\terrain:/data\" `\n  tumgis/ctb-quantized-mesh\n```\n\n### Create a GDAL Virtual Dataset (optional)\n\nIf you dataset consists of a single file, continue to the next step.\nIf your dataset consists of multiple tiles (more than one file), a\n*GDAL Virtual Dataset* needs to be created using the `gdalbuildvrt` app.\n\n```sh\ngdalbuildvrt \u003coutput-vrt-file.vrt\u003e \u003cfiles\u003e\n```\n\nFor instance, if you have several `*.tif` files, run:\n\n```sh\ngdalbuildvrt tiles.vrt *.tif\n```\n\nMore options to create a *GDAL Virtual Dataset* e.g. using a *list of files* are\ndescribed in the [gdalbuildvrt documentation](https://www.gdal.org/gdalbuildvrt.html).\n\n### Create Cesium Terrain files\n\nFirst, create an output folder for you terrain, e.g. `mkdir -p terrain`.\nSecond, run CTB to create the terrain files:\n\n```sh\nctb-tile -f Mesh -C -N -o terrain \u003cinputfile.tif or input.vrt\u003e\n```\n\nFor example, if a `tile.vrt` has been created as described above:\n\n```sh\nctb-tile -f Mesh -C -N -o terrain tile.vrt\n```\n\nThe `ctb-tile` app supports several options. Run `ctb-tile --help` to display all options.\nFor larger datasets consider setting the `-m` option and the `GDAL_CHACHEMAX` environment\nvariable as described [here](https://github.com/geo-data/cesium-terrain-builder#ctb-tile).\n\n### Create Cesium layer description file\n\nFinally, a *layer description* file needs to be created. Simply run the same\ncommand you used for creating the terrain files again adding the `-l` switch. For instance:\n\n```sh\nctb-tile -f Mesh -C -N -o terrain tiles.vrt            # Create terrain files\nctb-tile -f Mesh -C -N -l -o terrain tiles.vrt         # Create layer description file\n```\n\nFinally, your terrain data folder should look similar to this:\n\n```text\n$ tree -v -C -L 1 terrain/\nterrain/\n|-- 0\n|-- 1\n|-- 2\n|-- 3\n|-- 4\n|-- 5\n|-- 6\n|-- 7\n|-- 8\n|-- 9\n|-- 10\n|-- 11\n|-- 12\n|-- 13\n|-- 14\n|-- 15\n`-- layer.json\n```\n\nThe quantized-mesh terrain is now ready for usage.\n\n## Troubleshooting\n\n### Performance issues\n\nRead the [recommendations](https://github.com/geo-data/cesium-terrain-builder#recommendations) for `ctb-tile`\ncarefully, especially when handling large datasets.\n\n### Handling large datasets\n\nDatasets with a big extent can lead to overflow errors on lower zoom levels:\n\n```text\n0...10...20...30...40...50...60...70...80...90...ERROR 1: Integer overflow : nSrcXSize=41494, nSrcYSize=16585\nERROR 1: IReadBlock failed at X offset 0, Y offset 0: Integer overflow : nSrcXSize=41494, nSrcYSize=16585\nERROR 1: Integer overflow : nSrcXSize=41494, nSrcYSize=16585\nERROR 1: IReadBlock failed at X offset 0, Y offset 0: Integer overflow : nSrcXSize=41494, nSrcYSize=16585\nERROR 1: IReadBlock failed at X offset 0, Y offset 0: IReadBlock failed at X offset 0, Y offset 0: Integer overflow : nSrcXSize=41494, nSrcYSize=16585\nERROR 1: Integer overflow : nSrcXSize=41494, nSrcYSize=16585\nERROR 1: IReadBlock failed at X offset 0, Y offset 0: Integer overflow : nSrcXSize=41494, nSrcYSize=16585\nERROR 1: IReadBlock failed at X offset 0, Y offset 0: IReadBlock failed at X offset 0, Y offset 0: Integer overflow : nSrcXSize=41494, nSrcYSize=16585\nERROR 1: Integer overflow : nSrcXSize=41494, nSrcYSize=16585\nERROR 1: IReadBlock failed at X offset 0, Y offset 0: Integer overflow : nSrcXSize=41494, nSrcYSize=16585\nERROR 1: IReadBlock failed at X offset 0, Y offset 0: IReadBlock failed at X offset 0, Y offset 0: Integer overflow : nSrcXSize=41494, nSrcYSize=16585\n```\n\nAs described [here](https://github.com/tum-gis/cesium-terrain-builder-docker/issues/3#issuecomment-772680266),\nthis is caused by GDAL trying to create overviews from input data.\nA possible solution is to create simplified versions of the input data with lower resolutions and use them\nfor creating the mesh tiles on lower levels.\nThis can be done using e.g. [gdal_translate](https://gdal.org/programs/gdal_translate.html).\nAfter that, try to create mesh tiles using `ctb-tile` with the resolutions that do not crash starting from\nlevel 0.\nTry to use the highest resolution possible that does not crash for each level.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftum-gis%2Fcesium-terrain-builder-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftum-gis%2Fcesium-terrain-builder-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftum-gis%2Fcesium-terrain-builder-docker/lists"}