GISBox

Cesium Terrain Service

GISBox is a one-stop 3D GIS data editing, conversion and publishing platform that supports editing in multiple GIS formats such as OSGB/GEOTIFF/RVT, converting to 3DTiles/Terrain and publishing.

Introduction

Cesium Terrain Service is a server designed for Cesium.js. It is used to easily provide file system-based terrain tilesets. It supports working with CesiumTerrainProvider class of Cesium.js to render high-precision terrain data in the browser. It uses binary file structure to store terrain data. Based on Quantized Mesh technology, it reduces data storage space through compression and quantization processing, and improves loading and rendering performance. The service supports on-demand data loading, dynamically loads terrain slices of different resolutions according to user views, adapts to different levels of view requirements, and ensures efficient terrain loading.

File Structure

The file structure of Cesium Terrain Service is centered around the .terrain binary file, and mainly includes the following simplified parts:

  1. Header: stores basic information about tiles, such as center coordinates, highest/lowest elevation, circumscribed sphere range (for rendering optimization), etc.
  2. Vertex Data: contains vertex coordinates and heights of terrain meshes, using incremental encoding and ZigZag compression to reduce storage space.
  3. Index Data: defines how vertices are connected into triangle meshes, supports 16-bit or 32-bit index formats, and fills and aligns.
  4. Additional data (optional): such as color, texture, or attribute information, used to enhance terrain visualization.

This structure supports fast loading and rendering of large-scale terrain data through efficient compression and hierarchical storage.

Pros

  1. **Efficient loading and rendering: **Using quantized grid technology, terrain data is compressed and quantized to significantly reduce storage space and improve loading and rendering performance, especially suitable for large-scale terrain data sets.
  2. On-demand loading: Supports dynamic loading of terrain slices of different resolutions according to user views, without the need to load the entire terrain dataset at one time, reducing initial loading time and memory usage.
  3. **Multi-resolution support: **Terrain slices have different levels of detail (LOD), showing high-precision details at close range and using low-resolution data at long distances, saving computing resources.
  4. **Flexible expansion and deployment: **New terrain tile sets can be easily added, and Docker containers are supported to start servers with one click, without complex server configuration, facilitating development and testing.
  5. **Built-in cache mechanism: **Memcached can be optionally integrated to implement more advanced cache strategies and improve data access speed.

Cons

  1. **High learning cost: **It requires certain WebGL and 3D graphics programming knowledge, which may be a certain learning threshold for beginners.
  2. **High hardware resource requirements: **When processing large-scale terrain data, the demand for hardware resources (such as CPU and memory) is high, which may not be suitable for all scenarios.
  3. **Limited editing ability: **It mainly focuses on the display and rendering of terrain data, and the ability to edit models is weak, and complex terrain editing operations cannot be performed.

Application Scenario

Cesium Terrain Service is suitable for 3D geographic information systems (GIS) and virtual earth applications that require efficient loading and rendering of large-scale terrain data, such as terrain data prototype and application development, visualization of terrain data, and geographic information system experiments in education and research.

Example

  1. Cesium Terrain Service.

Related GIS Services

Web Coverage Service (WCS)

Web Feature Service(WFS)

Web Map Tile Service (WMTS)

Tile Map Service (TMS)

References

  1. https://community.cesium.com/t/terrain-service/19344
  2. https://github.com/geo-data/cesium-terrain-server
  3. https://community.cesium.com/t/cesium-terrain-server/715