REOPEN - Odd interpolation behaviour using image-mosaic and layer groups



JVM Version: Oracle Corporation: 1.8.0_242 (OpenJDK 64-Bit Server VM)

GeoServer Nightly 2020-03-01

PostGIS for layer datastore.

Data set:

  • Image mosaic setup for use as a time series

  • Each granule covers entire area of interest

  • Granule are each a GeoTIFF (generated with internal tiling and overviews for performance)

Odd behaviour observed:

1) Interpolation is working when GetMap contains a single layer

  • layers=snow

  • layers=snow&interpolation=bicubic

  • layers=snow&interpolation=bilinear

2) Interpolation is ignored (it is always nearest neighbour) when GetMap contains multiple layers

  • layers=snow,rain

  • layers=snow,rain&interpolation=bicubic,bicubic

  • layers=snow,rain&interpolation=bilinear,bicubic

  • using a layer group has the same effect

Have performed some research which I will cover in the comments.


Single Snow Layer

Layer Group showing snow and ice.




Bryan Kilgore
March 16, 2020, 1:09 PM

Built up multiple VMs now with Docker using different version and each time the layer group works initially but eventually breaks with more granules added.

Charles-Henry COLIN
July 9, 2020, 8:28 AM

Hi all, I would like to add details on this ticket because I have exactly the same problem (which is really tuff to deal with).

My geoserver config :

Build Information

  • Version2.16.1

  • Révision Git3d2f9ae04399e37dd8ba381436707d8eb85cafa0

  • Build Date22-Nov-2019 01:35

  • Version de GeoTools22.1 (rev 3a718dd011aa055585d70e786b7db3c8a54a2100)

  • Version GeoWebCache1.16.1 (rev 1.16.x/0933590fc2096aaf2345789db9993fbc316823f9)

JAVA : jre1.8.0_241

Run on a VMware Winserver 2016

I’m working with a datastore of multiband Geotiff rasters internally tiled, stored on filesytem.

I’m using image mosaic plugin to build differents layers. Layers are set with shp footprint cuts, multiCSR management and also used with time dimension.

Bicubic interpolation is set by default on each layer and on the WMS settings.

Here is the result of my tests :

Styling a layer with only one Rastersymboliser tag in the SLD is working → interpolation is bicubic from WMS (différents outputs are working, png Jpeg)

All the other tests bellow are not working → it seeams the interpolation methods apllied is nearest neighbour insted of bicubic.

  • Adding another Rastersymboliser with a different rule inside the same style

  • Adding another FeatureTypeStyle in the same style

  • Using a group of layers with each individual layer were bicubic interpolation is working fine (so it means the style used on each layer as only one RasterSymbliser tag)

The last one is really hard to understand because it seems when you are using layer groups the process is not only a fusion between all the layers but I guess the interpolation method is applied only once at the end of the process to save process time.

The only way I found to accomodate this issue is to request individualy layers which are working on there own and merge them outside geoserver. But this is not really powerfull.

I do not have any skilled in java so it is too much for me to try to fix the issue.

Charles-Henry COLIN
8 days ago

Continuing my implementation, I found another way to use bicubic interpolation with my imagemosaic Geotiff multiband rasters.

Actually I stop using multiCSR management and I reproject (with an external tool GDAL) before adding my raster in the mosaic. By this way I have only one CSR : I use a commun one EPSG:3857.

I also tried with 4326 but it doesn’t work . I guess this is due to non-cartesian coordinates CRS.

So using a source EPSG:3857 projection I succed in displaying a bicubic interpolated combine layers .

Geoserver is even able to reproject the render for EPSG:4326 with WMS requests → so everything is working for me now.

Bryan Kilgore
8 days ago

Mine would work for a little while but then stop working after random amount of time. I no longer use layer groups at all due to my implementation now but it was a very odd issue that was seen not only by myself but also . Hope it stays working for you and the bug has been squashed.

Charles-Henry COLIN
5 days ago

Hey I guess I have good news for you .

I’ve just found why the bicubic projection was not apply to my mosaic ! Actually I thought it was due to multiCSR used in the the same mosaic, but today when I add a new granule to my mosaic I lost the bicubic interpolation for all my mosaic → I was

So I deleted my mosaic to store to implement a new one and it works back again.

So the solution is : there is a parameter inside a file which is auto-generate when you create an image mosaic store. This file is called : “name of your mosaic directory files”.properties.

This file has a parameter called “HETEROGENEOUS”

  • when it is set to true interpolation does not works

  • when it is set to false interpolation works 😁

I don’t know why right now but it seems that geoserver change this parameter sometimes or when you load a new granule. I don’t know. But I’m sure this makes interpolation working or not.

Hope it will works for you also.




Bryan Kilgore



Fix versions


Affects versions