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
Other
709 stars 339 forks source link

Bathymetric data - negative elevations #19

Closed aberenyi closed 9 years ago

aberenyi commented 9 years ago

Hi,

I am trying to visualise some bathy data using your awesome tool. However, it looks like that all elevation data is inverted (I am using a tiff with negative elevation values to generate the terrain files).

Is this by design?

Cheers

homme commented 9 years ago

Hi, I'm assuming your bathymetry data is in meters. Do the depths go below -1000 meters? If so you are probably running into a limitation of the cesium heightmap terrain format used in the tiles, as they are only designed to display data up to -1000 meters deep. The newer quantized mesh format overcomes this limitation but is not yet supported by the tool.

aberenyi commented 9 years ago

Hi - thanks for the response.

Yes, the data is in meters and goes way below -1000 m. It is good to know that the newer format does support this. I assume the tool will support the newer format at some point too - any idea in terms of timescale?

homme commented 9 years ago

I'd certainly like the tool to support the newer format: it's on the TODO list. However, unfortunately there are no immediate plans to do it; it will either require some funding to work on the implementation or a code contribution.

alienatorZ commented 9 years ago

homme,

Until someone can help to integrate the quantized mesh, would it be possible to edit the CesiumTerrainProvider.js and your code to support elevations below -1000 feet? I believe Cesium can work with it, but there is just the limitation of the provider. If I change the CesiumTerrainProvider to offset to say... -3000m would I need to edit your code also?

Thanks!

homme commented 9 years ago

@alienatorZ Yes, you'd need to edit the code here and substitute 1000 for your limit e.g. 3000. Note, however, that this will limit the maximum altitude that can be displayed in the tiles to, I think, 10107m (-3000 + (65535 / 5.0)).

alienatorZ commented 9 years ago

Great! Thank you. I am only looking at oceans so any depth over about 100m doesnt concern me. Ill try it out.

Thank you again!

homme commented 9 years ago

No problem, it will be interesting to hear how you got on.

Vinni0803 commented 8 years ago

@alienatorZ , @aberenyi @homme

Hi. Are you able to load your data correctly ?? I'm also trying to load bathy data (terrains created using tiff file), at ground cesium terrain provider is showing data correctly but at sea level its showing positive height ( i mean height of sea is higher than ground ). Any suggestions.

sushrut141 commented 7 years ago

Hi @homme , We have been using cesium-terrain-builder to serve height map data but now we also need to visualize Bathymetry data i.e. sea level terrain. As stated above this requires us to support the Quantized Mesh Terrain Data for use with Cesium. Apart from https://cesiumjs.org/data-and-assets/terrain/formats/quantized-mesh-1.0.html we haven't found found any other information on how to implement it. Could you please share any information on Quantized Mesh Terrain format you have so that we can try making it a part of cesium-terrain-builder.

markerikson commented 7 years ago

Issue #29 discusses some other libs and tools that have some measure of support for Quantized-Mesh . And yeah, I'd still love to see it added to CTB, but have no time to tackle it myself.

sushrut141 commented 7 years ago

Is there any reason why each height value represents one fifth the height. Is it so that the scale of values ranges from -1000 to 65535 so that we have increased precision when interpolating between points in the terrain mesh?

bibuzz commented 3 years ago

@alienatorZ , @aberenyi @homme

Hi. Are you able to load your data correctly ?? I'm also trying to load bathy data (terrains created using tiff file), at ground cesium terrain provider is showing data correctly but at sea level its showing positive height ( i mean height of sea is higher than ground ). Any suggestions.

Even I am getting the same issue, my zoom level for the tiles generated is 9, for land it works fine. But the ocean level is above the land level. Did you figure out what was the issue?