How to use CesiumTerrainProvider to display Bathymetry of depths greater than 1000m

Hi all,

I read in this post above that the height in the *.terrain tiles is unsigned short which means it is 16bit and has an upper limit of 65535. And because the height unit is 1/5 meter, the actual limit for its range is 13107 meters.

I am currently trying to use CesiumTerrainProvider to serve a terrain data that is a merge of topography (land elevation) and bathymetry, which means some regions of the world will have range greater than 13107. I am currently trying to resolve the -1000m limit within the ctb-tile tool (GitHub - geo-data/cesium-terrain-builder: A C++ library and associated command line tools designed to create terrain tiles for use in the Cesium JavaScript library) but even if I can resolve that, I still have the range limit.

Is there anyway the 1/5 meter unit can be tweaked on the client (CesiumJS) side?

It’s hacky, but you may be able to adjust terrainProvider._heightmapStructure.heightScale to a value of your choice.

Are you committed to using the heightmap format, or could you consider alternatives?

What I eventually did was making terrain data I am using to have the sea level at 9000m which covers all the area I am interested to be within the 13107m range. I then offset the ellipsoid the terrain is “covering” by -9000m (x,y,z of the Cartesian3) as well so it works seemingly with actual locations of czml data.

Do you forsee any problem with the approach above?

No major concerns there. Glad you found a workaround.