Geoserver - Unexpected GetFeatureInfo Behavior for ImageMosaic Layer


Hi all! We’re currently using 2.25.3.0-CLOUD(1) and have a layer (with no caching) created from an Image Mosaic store. This store has only 2 raster tif files, with NoData Value=nan, and which are not next to each other.

In the image attached you can see:

  • 2 smaller rectangles which are the bounding boxes of each raster tif file
  • 1 bigger outer rectangle which represents the layer bounding box (calculated automatically by Geoserver or when clicking Compute from data)
  • 1 point P1 (Green) outside the bounding box, for which GetFeatureInfo returns empty feature array => CORRECT there’s no information at all
    = 1 point P2 (Red) inside the bounding box BUT not inside the tif file, so also no data, however for which GetFeatureInfo returns one feature and all bands with value 0!! (url and responses below (2))
    Any idea why the behaviour for P2? Can we change this value 0 to e.g. -1 ? We tried playing with some parameters, but none had effect (exclude_nodata_result, env=NoData:-1, cql_filter=INCLUDE).
    (1) reproduced also on non-cloud version 2.21.2
    (2) urls called and responses:
  • P1 - {{geoserver_url}}wms?bbox=160.0,-47.000001,160.000001,-47.0&format=jpeg&info_format=application/json&request=GetFeatureInfo&layers=<Layer_name>&query_layers=<Layer_name>&feature_count=12&width=1024&height=1024&x=0&y=0&tiled=true&srs=EPSG:4326
{
    "type": "FeatureCollection",
    "features": [],
    "totalFeatures": "unknown",
    "numberReturned": 0,
    "timeStamp": "2025-06-17T11:07:39.618Z",
    "crs": null
}
  • P2 -wms?bbox=160.0,-40.000001,160.000001,-40.0&format=jpeg&info_format=application/json&request=GetFeatureInfo&layers=<Layer_name>&query_layers=<Layer_name>&feature_count=12&width=1024&height=1024&x=0&y=0&tiled=true&srs=EPSG:4326
{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "id": "",
            "geometry": null,
            "properties": {
                "Band1": 0,
                "Band2": 0,
                "Band3": 0,
                "Band4": 0,
                "Band5": 0,
                "Band6": 0,
                "Band7": 0,
                "Band8": 0,
                "Band9": 0,
                "Band10": 0
            }
        }
    ],
    "totalFeatures": "unknown",
    "numberReturned": 1,
    "timeStamp": "2025-06-17T11:05:52.033Z",
    "crs": null
}