kaktus40 / Cesium-GeoserverTerrainProvider

plug in to use geoserver as terrain provider
Other
356 stars 140 forks source link

Using UInt32 tiles #23

Closed ihor-hrechka closed 6 years ago

ihor-hrechka commented 6 years ago

Hi and thanks again for your great work!

As I know by default the plugin works with data in Integer 16 bit format. Float32 also can be used with implementation of formatArray method, provided by you.

Is there any ability to use elevation map with data in UInt32 bit format without convertation with terrain provider?

GdalInfo: capture

Please let me know if you need more info or data sample! Thanks in advance!

kaktus40 commented 6 years ago

Hello, you should use formatArray with the implementation I gave you with one change: temp = viewerIn.getFloat32(i, false) - offset; becomes temp = viewerIn.getUint32(i,false) - offset; You should check the implementation of dataview here

ihor-hrechka commented 6 years ago

Hi and thanks for your answer!

I tried to made this change but there is no result (globe is still flat). Please see screenshot bellow:

untitled

I made change 1. I also tried to change 2, 3 point but result the same. Can you tell me where I made a mistake?

kaktus40 commented 6 years ago

Did you configure bil/DDS plugin in geoserver?

ihor-hrechka commented 6 years ago

Sorry, what do you mean "configure"? It works perfect with test data in Float32 format. Do I need to do some additional configuration for Uint32 data?

kaktus40 commented 6 years ago

Well in my version of the bill/DDS plugin it seems you can define bil 8, bil 16 or bil 32 format with the endianness. I think that bil 32 must be float format because I could indicate int 32 format!

ihor-hrechka commented 6 years ago

For this layer (with images in Uint32 format) I'm using following settings:

capture

Is it OK in my case?

kaktus40 commented 6 years ago

I think that OK. Now can you see something with float32?

ihor-hrechka commented 6 years ago

With images in Float32 format - everything fine, but with images in Uint32 format - globe is flat.

kaktus40 commented 6 years ago

Sorry I can't help you on this case because it seems being a limitation from geoserver or bil dds plug in. Maybe, it doesn't take unint32 format. You should post a request in the community of geoserver.

ihor-hrechka commented 6 years ago

Understood. Anyway thanks for your answers!