Experimentations with terrain elevation data for generating and serving 3D Tilesets
This tool allows the user to visualise 2D height maps in 3D using the CesiumJS library.
- GeoServer v2.15.1
- QGIS v3.4
- pgAdmin4
- PostgreSQL v9.6
- PostGIS v2.3.9
- Docker
- Go
- Cesium Terrain Builder
- Cesium Terrain Server
- Node Package Manager (NPM)
- JDBC Image Mosaic Plugin extention (compatible with the GeoServer version)
Exract the JDBC Image Mosaic plugin zip contents into the directory geoserver-2.15.1/webapps/geoserver/WEB-INF/lib
Install Cesium Terrain Builder and Cesium Terrain Server using Docker
Cesium Terrain Builder requirements:
- gdal version>=2.0.0 installed on system
- gdal source developement header files
- Cmake should be available on the system
Cesium Terrain server requirements:
system should have Go installed as the server is written in Go.
Setting up the terrain files for serving,
If the folder system is like this:
/data/files/
├── rasters
│ └── DEM.tif
└── tilesets
└── terrain
To create terrain tiles from DEM files,
-
To load cesium terrain builder in docker, in the bash shell run:
docker run -t -i homme/cesium-terrain-builder:latest /bin/bash
-
To check that the cesium terrain builder has been sucessfully loaded, run:
ctb-tile --version
-
To mount data from host directory in the docker container, run:
docker run -v /data/files:/data -t -i homme/cesium-terrain-builder:latest bash
Here, the host directory /data/files is mapped to to /data in the container.
-
To tile the file /data/rasters/DEM.tif, run the command:
ctb-tile --output-dir /data/tilesets/terrain/test /data/rasters/DEM.tif
You will find various .terrain files in the directory: /data/tilesets/terrain/test
To run the cesium terrain server to visualise the terrain tiles, run:
docker run -p 8080:8000 -v /data/docker/tilesets/terrain:/data/tilesets/terrain \ geodata/cesium-terrain-server
Enter http://localhost:8080/ in the web browser to visualise the served terrain using Cesium.
For bugs or issues, go to: Cesium Terrain Builder or Cesium Terrain Server
Download the source code from: Cesium-BISAG