Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback #4

Closed
gberaudo opened this issue Jun 13, 2014 · 3 comments
Closed

Feedback #4

gberaudo opened this issue Jun 13, 2014 · 3 comments

Comments

@gberaudo
Copy link

Hi,

First, thank you for maintaining this plugin.
I have been experiencing with it and would like to share my feedback and also ask questions ;).

It works using BIL/PNG, style, on top of one geotiff.

PNG tiles only weight 3K when BIL are using 8K.
So why do you advice the use of BIL format?

Is it taking more resources on the client or server?
Have you done some measurements?

I found two situations where geoserver would serve bad BIL:

You fallback on PNG if you cannot decode the BIL.
Do you also have these issues?

For the record, I used gdal_retile.py -v -r bilinear -levels 4 -ps 2048 2048 -co "TILED=YES" -targetDir bmpyramid srtm90.tiff.

Regards,

Guillaume

PS: maybe you could explain in the README how to select a request image format (copying the image descriptor).

@kaktus40
Copy link
Owner

Hello,
I use BIL above png because this last format needs a longer process than BIL data:

  • for BIL data, geoserver just needs to read each pixel of the image (16 bits grey) in order to create an array of 16 bits integer data.
  • for png image, geoserver must read and translate color of each pixel thanks to SLD in order to create a new image

Geoserver uses less ressources to create a BIL format and it's easier for client javascript to process an array of data rather than to process an image which needs to be converted into a bigger array (twice size of bil array). Nevertheless, the net cost is bigger like you said.

I cope with bad BIL in the plug in:
1 https://github.com/kaktus40/Cesium-GeoserverTerrainProvider/blob/master/GeoserverTerrainProvider.js#L572 ensures that the BIL received by client has the good size.
2 If the BIL received hasn't the good size, the client request the same tile in a png format using the style proposed in mySLD.xml. (see lines 367 and 387 )

The style in mySLD.xml defines a ramp where a height of -32768m is converted into color #000000 and a height of 15000m is converted into color #00BA98.

I don't think it's needed to select an image format because from the point of view of the plug in, it's a poor workaround to directly work with images not associated with a SLD (less precise than BIL array or an image associated with mySLD.xml)

The plug in request the description of layer from geoserver and choose the proper format to use (BIL first, png and finally jpeg)

@kaktus40
Copy link
Owner

kaktus40 commented Aug 1, 2014

Hello, in my update of GeoserverTerrainProvider for cesium V1,
I followed your recommandations and I improved the plug in in order to
use png format.
I saw that you worked on bil plugin into geoserver also.
I'll explain all use case of the plug in in the README

For now I test my improved version.

On 13/06/2014 17:24, gberaudo wrote:

Hi,

First, thank you for maintaining this plugin.
I have been experiencing with it and would like to share my feedback
and also ask questions ;).

It works using BIL/PNG, style, on top of one geotiff.

PNG tiles only weight 3K when BIL are using 8K.
So why do you advice the use of BIL format?

Is it taking more resources on the client or server?
Have you done some measurements?

I found two situations where geoserver would serve bad BIL:

You fallback on PNG if you cannot decode the BIL.
Do you also have these issues?

For the record, I used gdal_retile.py -v -r bilinear -levels 4 -ps
2048 2048 -co "TILED=YES" -targetDir bmpyramid srtm90.tiff.

Regards,

Guillaume

PS: maybe you could explain in the README how to select a request
image format (copying the image descriptor).


Reply to this email directly or view it on GitHub
#4.

@gberaudo
Copy link
Author

gberaudo commented Aug 4, 2014

Hello,

Thank you for informing me.
I like your new examples and pro/cons table.

I have been trying to have my BIL patch merged in geoserver but there
seems to be something wrong with the junit cases.

Regarding BIL size, I guess they are not served gziped, which would
explain the difference with png. Geoserver probably supports gzipping
generated content which would void the small advantage of png files.

Cheers,

Guillaume

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants