• Stars
    star
    201
  • Rank 194,491 (Top 4 %)
  • Language
    Dockerfile
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dockerfile for the geo-data/cesium-terrain-builder app with quantized mesh support.

Cesium Terrain Builder Docker

This repo contains a Dockerfile for the Cesum Terrain Builder (CTB) app with support for the new Cesium terrain format quantized-mesh. It is build from a fork providing quantized-mesh support, as described in this artice. Information on the most recent development of this fork is available in this pull request. Thanks to @homme and @ahuarte47 for the great work on Cesium Terrain Builder and quantized-mesh support.

Note: The images are rebuild on every push to ahuarte47/cesium-terrain-builder/tree/master-quantized-mesh. Goto hub.docker.com/r/tumgis/ctb-quantized-mesh to check for the latest build.

If you experience problems or want to contribute please create an issue or pull request.

Follow the steps below to create your own quantized-mesh tiles for Cesium using this Docker image.

News

  • 2023-03-06:

  • 2020-11: Updated alpine image to Alpine v3.12 and GDAL v3.14

  • 2020-11: Reduced size of all images using multi stage builds.

Image variants

The Docker images are available on DockerHub from tumgis. To get the image run: docker pull tumgis/ctb-quantized-mesh:<TAG> Following tags are available:

Tag Build status Description
latest Build Status Latest image build based on Debian and GDAL 2.4.0
alpine Build Status Image based on leightweight Alpine Linux v3.12 and GDAL v3.14

Content

Preparation

Docker settings

The system resources Docker can use are limited by default on Windows systems. Goto Docker tray Icon -> Settings -> Advanced to adjust the number of cores and main memory Docker can use to increase performance.

Data pre-processing

It is highly recommended (but not required) to transform your data to the WGS84 (EPSG:4326) coordinate reference system before using CTB. This helps to avoid vertial or horizontal offsets of terrain datasets. Use the NTv2 transformation method if available. This is e.g. supported by FME using the EsriReprojector transformer or ESRI ArcGIS.

Data storage

Put your data in a folder, that can be mounted by Docker. On Windows, you will have to grant access to the drive where the data is located before being able to mount the folder. Goto Docker tray Icon -> Settings -> Shared Drives to share drives with Docker. Visit this blog post for a comprehensive guide on mounting host directories on Windows.

In the following we assume that your terrain data is stored in d:\docker\terrain for a Windows Docker host and drive d:\ is shared with Docker. For a Linux Docker host we assume your data is stored in /docker/terrain.

Cesium Terrain Builder usage

When your data is transformed and copied to a location available for Docker your are ready for creating a Cesium terrain with CTB.

Start CTB container and mount data folder

Before starting CTB it is recommended to pull the latest image version using docker pull tumgis/ctb-quantized-mesh. After that, start a CTB container and mount your terrain data folder to /data in the container. Follow the examples below for different operating systems and shells.

Linux - bash

docker run -it --name ctb \
    -v "/docker/terrain:/data" \
  tumgis/ctb-quantized-mesh

Windows - cmd

docker run -it --name ctb ^
    -v "d:/docker/terrain:/data" ^
  tumgis/ctb-quantized-mesh

Windows - git-bash

winpty docker run --rm -it --name ctb \
    -v "d:\\docker\\terrain:/data" \
  tumgis/ctb-quantized-mesh

Windows - powershell

docker run -it --name ctb `
    -v "d:\docker\terrain:/data" `
  tumgis/ctb-quantized-mesh

Create a GDAL Virtual Dataset (optional)

If you dataset consists of a single file, continue to the next step. If your dataset consists of multiple tiles (more than one file), a GDAL Virtual Dataset needs to be created using the gdalbuildvrt app.

gdalbuildvrt <output-vrt-file.vrt> <files>

For instance, if you have several *.tif files, run:

gdalbuildvrt tiles.vrt *.tif

More options to create a GDAL Virtual Dataset e.g. using a list of files are described in the gdalbuildvrt documentation.

Create Cesium Terrain files

First, create an output folder for you terrain, e.g. mkdir -p terrain. Second, run CTB to create the terrain files:

ctb-tile -f Mesh -C -N -o terrain <inputfile.tif or input.vrt>

For example, if a tile.vrt has been created as described above:

ctb-tile -f Mesh -C -N -o terrain tile.vrt

The ctb-tile app supports several options. Run ctb-tile --help to display all options. For larger datasets consider setting the -m option and the GDAL_CHACHEMAX environment variable as described here.

Create Cesium layer description file

Finally, a layer description file needs to be created. Simply run the same command you used for creating the terrain files again adding the -l switch. For instance:

ctb-tile -f Mesh -C -N -o terrain tiles.vrt            # Create terrain files
ctb-tile -f Mesh -C -N -l -o terrain tiles.vrt         # Create layer description file

Finally, your terrain data folder should look similar to this:

$ tree -v -C -L 1 terrain/
terrain/
|-- 0
|-- 1
|-- 2
|-- 3
|-- 4
|-- 5
|-- 6
|-- 7
|-- 8
|-- 9
|-- 10
|-- 11
|-- 12
|-- 13
|-- 14
|-- 15
`-- layer.json

The quantized-mesh terrain is now ready for usage.

Troubleshooting

Performance issues

Read the recommendations for ctb-tile carefully, especially when handling large datasets.

Handling large datasets

Datasets with a big extent can lead to overflow errors on lower zoom levels:

0...10...20...30...40...50...60...70...80...90...ERROR 1: Integer overflow : nSrcXSize=41494, nSrcYSize=16585
ERROR 1: IReadBlock failed at X offset 0, Y offset 0: Integer overflow : nSrcXSize=41494, nSrcYSize=16585
ERROR 1: Integer overflow : nSrcXSize=41494, nSrcYSize=16585
ERROR 1: IReadBlock failed at X offset 0, Y offset 0: Integer overflow : nSrcXSize=41494, nSrcYSize=16585
ERROR 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
ERROR 1: Integer overflow : nSrcXSize=41494, nSrcYSize=16585
ERROR 1: IReadBlock failed at X offset 0, Y offset 0: Integer overflow : nSrcXSize=41494, nSrcYSize=16585
ERROR 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
ERROR 1: Integer overflow : nSrcXSize=41494, nSrcYSize=16585
ERROR 1: IReadBlock failed at X offset 0, Y offset 0: Integer overflow : nSrcXSize=41494, nSrcYSize=16585
ERROR 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

As described here, this is caused by GDAL trying to create overviews from input data. A possible solution is to create simplified versions of the input data with lower resolutions and use them for creating the mesh tiles on lower levels. This can be done using e.g. gdal_translate. After that, try to create mesh tiles using ctb-tile with the resolutions that do not crash starting from level 0. Try to use the highest resolution possible that does not crash for each level.

More Repositories

1

cesium-point-cloud-generator

A small Java-based tool for the generation of point cloud visualization datasets according to Cesium 3D Tiles.
JavaScript
173
star
2

rtron

r:trΓ₯n is a road space model transformer library for OpenDRIVE, CityGML and beyond
Kotlin
46
star
3

3dcitydb-docker-postgis

3D City Database PostGIS Docker image
Shell
37
star
4

3d-model-new-york-city

FME Workspaces created in the cours of generating a semantic digital 3D city model for the entire city of New York are available for download on this GitHub page.
35
star
5

CityGML2OBJv2

Command line converter of CityGML (.gml) to OBJ (.obj) files, while maintaining the semantics
Python
31
star
6

tum2twin

LOD3 models of the TUM campus in CityGML
30
star
7

ifc-to-citygml3

An FME workspace for converting IFC data sets to CityGML 3.0 data sets
22
star
8

3dcitydb-web-map-docker

3DCityDB Web Map Client Docker image
JavaScript
21
star
9

sddi-ckan-k8s

Helm chart for Smart District Data Infrastructure enabled CKAN
Smarty
16
star
10

a2d2_ros_preparer

Prepares the Audi Autonomous Driving Dataset (A2D2) for ROS
C++
14
star
11

InterSensorService

A simplified lightweight service to work with sensor and timeseries data from heterogeneous sources
Java
13
star
12

citygml-change-detection

A high-performance graph-based tool for automatic change detection in massive CityGML datasets
Java
12
star
13

tum-gis-iot-stack-basic

IoT stack of FROST-Server, Node-RED, Grafana and Caddy. No auth service like Keycloak is used.
JavaScript
12
star
14

citygml2-to-citygml3

A small Java program used to transform CityGML v2.0 to CityGML v3.0 files.
XSLT
12
star
15

iot-frost-ecosystem

This repository explains step-by-step process to work with various IoT platforms and allows their observations to manage and visualized in standardized ways.
12
star
16

ckan-docker

Docker images for Smart District Data Infrastructure (SDDI) enabled CKAN catalog
Dockerfile
9
star
17

tum-gis-iot-stack-k8s

Helm chart for an application stack to manage sensor data with open source software and tools unsing OGC SensorThingsAPI
JavaScript
9
star
18

road2citygml3

Guideline for modelling roads and the streetspace within semantic 3D city models using the international OGC standard City Geography Markup Language (CityGML) version 3.0.
Python
9
star
19

citygml-roof-segment-labels

Generate datasets of roof segment labels for aerial imagery derived from CityGML semantic 3D city models for semantic segmentation.
Jupyter Notebook
8
star
20

cartographer_audi_a2d2

Run Cartographer on the Audi Autonomous Driving Dataset (A2D2).
Lua
7
star
21

citymodel-compare

A tool to map and match CityGML datasets, as well as interpret their changes, all by using graphs.
Java
7
star
22

3dcitydb-docker-compose

Service orchestration for the 3DCityDB with Docker Compose
6
star
23

3dcitydb-wfs-docker

3DCityDB Web Feature Service (WFS) Docker image
Shell
6
star
24

creating-citygml-datasets

guideline collection on the creation of citygml datasets
Python
6
star
25

LCA-TGA

Life Cycle Assessment of Technical Building Services of Large Residential Building Stocks using Semantic 3D City Models
5
star
26

sumo-to-czml

These Python scripts read SUMO traffic simulation results from the FCD (floating car data) export in the CSV format and convert it to the time-dynamic visualization format CZML.
Python
5
star
27

SDDI-CKAN-Docker

Python
5
star
28

sensor-nodes

Arduino sketches, documentation, and images of sensor nodes we built.
C++
5
star
29

FROST-on-a-map

Basic examples for bringing SensorThingsAPI Locations and HistoricalLocations to web maps as markers or trajectories.
JavaScript
4
star
30

CZMLMovingObjects

Python
4
star
31

citygml3.0-transportation-examples

This repository contains sample datasets for the CityGML3.0 Transportation Model. It is explained how the data was generated and examples are shown to illustrate new concepts.
4
star
32

sos-examples

Example requests for the 52Β°North Sensor Observation Service (SOS) for inserting new sensors and observations.
Shell
3
star
33

ecitygml

Rust
3
star
34

citygml3-utility-network-ade

3
star
35

egml

Rust
3
star
36

sddi-security-federation-framework

SDDI Security Framework for Single-Sign-On (SSO) across Google and eduGAIN IdPs conformant to the EU General Data Protection Regulation (GDPR)
PHP
3
star
37

erosbag

Rust
2
star
38

clearance-space-detector

2
star
39

ecoord

Rust
2
star
40

3dcitydb-importer-exporter-docker

Dockerfile for the 3DCityDB Importer/Exporter
Shell
2
star
41

egraphics

Rust
2
star
42

ecitygml-converter

Rust
1
star
43

sensor-data-analyzer

Rust
1
star
44

opendrive-testfeld-a9

1
star
45

epoint

Rust
1
star
46

evoxel

Rust
1
star
47

CityGML-EnvPlan-ADE

1
star
48

citygml2-to-osi3

Prototypical module to convert from CityGML2 to OSI3.
Python
1
star
49

ckanext-relation-sddi

Python
1
star
50

ckanext-grouphierarchy-sddi

HTML
1
star
51

emesh-converter

Rust
1
star
52

eimage

Rust
1
star
53

emesh

Rust
1
star
54

opendrive-dataset-validation

1
star