Closed raghulsekar closed 1 year ago
Hello, thanks for your report. We expose the simple ocean layer, but it is part of the osgEarth software package. I can look to see if we can reproduce, but whether we can or not, we do not directly maintain the simple ocean layer driver.
I was able to add in code to change the sea level in the Ocean example in SDK. I am attaching the patch here. I see changes in the sea level immediately. Currently unable to reproduce the problem you indicate:
0 Sea Level:
350 sea level:
As you can see there is no change here.
osgEarth::GDALElevationLayer* oceanLayer = new osgEarth::GDALElevationLayer(); oceanLayer->setName("Bathymetry"); oceanLayer->setURL("D:/GEBCO_06_Jun_2023_55b1787783c5/GEBCO_06_Jun_2023_55b1787783c5/gebco_2023_n40.0_s0.0_w60.0_e100.0.tif"); oceanLayer->setVisible(true); map->addLayer(oceanLayer);
In your example, it looks like you're zoomed out quite a bit in order to see an ocean change of 70m.
The Simple Ocean layer is basically a semitransparent plane at 0.0 height that you'll see when you zoom in fairly closely. I do not see the plane in your image and it might be because you're zoomed out quite a bit.
I also do not have your data set to try to reproduce your error, but you do have the sample code that I attached that can reproduce a working example. Is this maybe a mismatch on expectations of what the simple ocean layer driver does?
My bad i tried setting the maxVisiblerange of oceanlayer and its working now, Thanks.
Great! Thanks for the update, glad it is working for you now.
I created a SimpleOceanLayer instance and also passed bathymetry data using GdalElevationLayer , i have a slider to increase the sea level which will set the SimpleOceanLayer ->setSeaLevel(value) But there is no visible change in the sea level though the sea value is set.