how ro avoid having my terrain mesh sinking under the "flat" ellispoid?

I’m trying to use my own terrain data through the Geoserver Terrain Provider plugin.
I can see my terrain, but it sinks below the rest of the globe. See the image attached.

I’ve tried changing heightOffset and other parameters, but nothing seems to solve the problem.

I wonder if it’s possible to use only portions of terrain along a flat ellipsoid beyond the terrain data. Is it?

thanks for your precious help,

giovanni

Hello,
indeed, I didn't use heightOffset but in the next version, I'll implement this option.

Mmm, I’m not sure I understand you. I’ve already tried to change thr heightOffset directly inside the terrain provider code, but it has no effects…

Probably I misunderstood the heightScale and heightOffset meaning.
I have a float grid going from 0 to 1943 meters. I’ve applied a color ramp from #000000 to #000797. Shouldn’t the heightScale be 1.0 and the Offset equally 0?
If I set the scale 1.0 I obtain something going to the moon! With the 1/1000 things go better, but I don’t understand why.
Anyway the offset doesn’t sort anything…

Giovanni

With your explication, I understand that you don't use bill/dds plugin which is more accurate than jpeg or png image.
When you see my SLD, color ramp maps -32768 m to #000000 and 15000 m to #00BA98 in order that interpolation operates in good conditions. After I remove 32768 m in geoserverPlugin to have the true altitude (see line 427).
What is your use case of geoserver plugin? Do you request image or bil data?

Yes, I’m using a png image beacuse I would like to use it with other WMS servers which aren’t able to serve bil data.
I don’t understand very well the logic behind your “32768”: #000000 is -32768, then you remove 32768… Probably in binary mode it makes more sense, but I miss it.

Could you suggest me how I should define my SLD, with a DTM going from 0 to 1943? It’s just a little portion of the Earth, which should emerge from the rest of the flat ellipsoidal surface.

Thanks a lot for your precious help. I’m moving my very first steps in Cesium and globes!

Giovanni

I’ve solved the problem of the sinking. It was caused by the wms images having a white background. Adding BGCOLOR=0x000000 to the wms request I get a black background outside by dtm boundary, which is the level 0 in my SLD definition.

Giovanni