Giter VIP home page Giter VIP logo

Comments (13)

Parthesh avatar Parthesh commented on June 27, 2024

You can refer #11
I had the same problem; stepping down the geoserver to 2.7.5 version did the trick for me.

from cesium-geoserverterrainprovider.

sushrut141 avatar sushrut141 commented on June 27, 2024

I tried running it by hosting the layers on Geoserver 2.7.5 but the issue still persists.
Setting waterMask true still causes the tiles to flicker and the terrain doesn't load.

from cesium-geoserverterrainprovider.

Parthesh avatar Parthesh commented on June 27, 2024

I too am getting the same WebGL warning but am not getting the flickering though..
watermask_issue

from cesium-geoserverterrainprovider.

sushrut141 avatar sushrut141 commented on June 27, 2024

is the water surface being animated?.....I've loaded the SRTM data as an image mosaic wuth the data being published in .png format. Could the error be because of mismatch in dataType as in float32 vs int16?

from cesium-geoserverterrainprovider.

sushrut141 avatar sushrut141 commented on June 27, 2024

From what I understand the plugin requests a BIL image first and if a good size image is not available it then requests a styled or converted image.
In the code I assumed that
imageToHeightmapTerrainData() was called when data was being read from an image.
In this function the waterMask is set as follows

for (var i = 0; i < heightBuffer.length; i++) {
if (heightBuffer[i] <= 0) {
waterMask[i] = 255;
}
}

However, the array "heightBuffer" is not defined in this function.
It is defined in the function arrayToHeightmapTerrainData(), which is used when parsing data from a BIL I assume.
The data in the imageToHeightMap function is being stored in the array "buffer".
I changed the waterMask to reflect this as :

for (var i = 0; i < buffer.length; i++) {
if (buffer[i] <= 0) {
waterMask[i] = 255;
}
}

On running with the modified plugin and using png images as source(by providing the formatImage object to the plugin) the tiles weren't flickering.
Using the debugger I saw that heightBuffer was "undefined" within the bounds of this function.
Which may be why the waterMask had undefined values causing the voids.

The water still isn't animated. Could anyone suggest a method to fix this.

from cesium-geoserverterrainprovider.

kaktus40 avatar kaktus40 commented on June 27, 2024

I merged your pull. Is it Ok for you?

from cesium-geoserverterrainprovider.

sushrut141 avatar sushrut141 commented on June 27, 2024

Thanks. That fixes the flickering but the water still isn't animated. Can you share some details on how
it is implemented? For example, the Cesium site says that for tiles having a mixture of land and water the waterMask is 256*256 bytes and elsewhere it is only one byte(pure land or water). I can't find a reference to this in the implementation.

from cesium-geoserverterrainprovider.

Parthesh avatar Parthesh commented on June 27, 2024

Still getting the flickering with geoserver 2.8.0 with waterMask kept either true or false.

flickering_issue_geoserver_280

from cesium-geoserverterrainprovider.

sushrut141 avatar sushrut141 commented on June 27, 2024

Did you try setting getTileDataAvailable as true always?
What about the format in which you are receiving images....the plugin expects little endian Int16 for bil images and 8 bit images otherwise.

from cesium-geoserverterrainprovider.

sushrut141 avatar sushrut141 commented on June 27, 2024

The sandcastle Materials examples uses a specular map of Earth to distinguish between land and water bodies. The water is enabled by creating a new material of type water.

primitive.appearance.material = new Cesium.Material({
    fabric : {
        type : 'Water',
        uniforms : {
            specularMap: '../images/earthspec1k.jpg',
            normalMap: require.toUrl('Assets/Textures/waterNormals.jpg'),
            frequency: 10000.0,
            animationSpeed: 0.01,
            amplitude: 1.0
        }
    }
});

Eath Specular map.
earthspec1k
Any ideas on how this could be used to enable water in a similar fashion.

from cesium-geoserverterrainprovider.

Parthesh avatar Parthesh commented on June 27, 2024

Yes I tried all those settings. Its still same.

from cesium-geoserverterrainprovider.

sushrut141 avatar sushrut141 commented on June 27, 2024

Can you post the code where you are creating the GeoserverTerrainProvider instance?
Check the network tab in Chrome debugger and see the image being returned by the wms request.
If its a bil image it ought to look muddy brown with terrain features barely visible , otherwise it should be a translated(bluish) image with the blue highlighting terrain.
Your issue might have something to do with your height data exceeding the bounds of the plugin.
See the limitations value passed to the instance ie. limitions.offset, limitations.lowest..etc...Also the check how the image looks when the SLD provided is enabled in geoserver.

from cesium-geoserverterrainprovider.

kaktus40 avatar kaktus40 commented on June 27, 2024

There is no activity on this issue, so I close.

from cesium-geoserverterrainprovider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.