kaktus40 / Cesium-GeoserverTerrainProvider

plug in to use geoserver as terrain provider
Other
360 stars 141 forks source link

Getting sharp edges on Cesium when using high resolution DEM #10

Closed Parthesh closed 9 years ago

Parthesh commented 9 years ago

I have attached the snapshot of the result that I am getting with 10m resolution DEM (Cartodem-10m). Initially it was Float-32 type(for which I used bil-32 from geoserver), but even after converting to Int-16 type (and using bil-16 from geoserver) same issue is recurring. Also I am getting similar results when I am using SISDP-10m DEM. Currently, I am using Cesium-1.13 and Geoserver 2.8.0. I referred to this issue(https://github.com/kaktus40/Cesium-GeoserverTerrainProvider/issues/7) which also consist of mention of similar problem, only in this case, the no. of levels while tiling the DEM seems to be more than sustainable(12-instead of 11). I used 4 levels and 512 x 512 as pixel size while giving the gdal_retile parameters. So, I increased the no. of levels to 11 and pixel size 100 x 100. Although there was reduction in the spikes but issue still remains. Please let me know the correlation between DEM resolution and parameters to be given while performing gdal_retile so that Cesium does not behave weirdly.

carto_10m_issue carto_10m_layer

Thanks, Parthesh B.

kaktus40 commented 9 years ago

Hello could you read this closed issue

Parthesh commented 9 years ago

I just read it. Is it necessary to use your javascript code from the closed issue, because I am using int_16 type of tiff file with 10m resolution.

kaktus40 commented 9 years ago

Hello, your geotiff can be 32 bit float or 16 bit integer, It's not important. The most critical parameters are in the definition of your layer: you must configure BIL format settings in bil 32 if you want that geoserver send 32 float data. In this case, you can use the code used in the previous issue!

Parthesh commented 9 years ago

Thanks for the info.... I got the desired output. I used Float-32 type of DEM with Big Endian configuration in geoserver and its working fine. But the Int-16 version of same DEM is not working. It seems that there is a problem if we try to use high resolution DEM in 16 bit format.

kaktus40 commented 9 years ago

That's normal: float-32 type is encoded on 4 bytes for each height and it's decimal whereas integer-16 type is encoded on 2 bytes for each height and it must be an integer between -32768 and 32767 meters!

kaktus40 commented 9 years ago

Could you send me the new picture?

Parthesh commented 9 years ago

Sure, here it is...

carto_10_result

kaktus40 commented 9 years ago

thanks that looks good