Hi,
I am seeing what appears to be an ImageMosaic regression between GeoServer 2.28.2 and 2.28.3.
I have an ImageMosaic consisting of GeoTIFF granules. With exactly the same data and configuration:
-
GeoServer 2.28.2 / GeoTools 34.2: works correctly
-
GeoServer 2.28.3 / GeoTools 34.3: fails
-
GeoServer 3.0.1 / GeoTools 35.1: fails
-
recent 2.28.x / GeoTools 34-SNAPSHOT: fails
-
recent 3.0.x / GeoTools 35-SNAPSHOT: fails
Behavior
Requests involving only a single granule render correctly.
When the requested BBOX intersects multiple granules, rendering may fail. This can be reproduced directly with WMS, so it does not seem to be related to GeoWebCache.
The relevant exception is:
java.lang.NumberFormatException: For input string: "178,29884233495"
at java.lang.Double.parseDouble(...)
at org.geotools.gce.imagemosaic.Utils.updateMDI(Utils.java:2334)
at org.geotools.gce.imagemosaic.Utils.updateRasterBand(Utils.java:2322)
at org.geotools.gce.imagemosaic.Utils.updatePamDatasets(Utils.java:2292)
at org.geotools.gce.imagemosaic.Utils.mergePamDatasets(Utils.java:2265)
at org.geotools.gce.imagemosaic.Mosaicker.createMosaic(Mosaicker.java:339)
I have seen the same exception with several values, for example:
169,78962803655
176,7898108829
166,30088104175
177,23066314594
168,95466278031
162,69203014978
It looks as if decimal values using a comma as the decimal separator reach Double.parseDouble() while PAM metadata from multiple granules is being merged.
What I have already tested
-
Removing all external
.tif.aux.xmlfiles does not help. -
CheckAuxiliaryMetadata=falsedoes not help. -
There are no
.ovrfiles in the minimal test dataset. -
Setting the JVM locale to
en_USdoes not help. -
Direct WMS requests fail as well, so GWC does not seem to be involved.
-
An ImageMosaic containing one TIFF works.
-
Adding a second TIFF reproduces the problem when both granules are involved in rendering.
Possible regression point
Since the same dataset works with GeoTools 34.2 and starts failing with GeoTools 34.3, I noticed GEOT-7865 – “ImageMosaic Supporting PamDataset stored in TIFFMetadata”, introduced around this version boundary.
I also noticed GEOT-7909 – “Improve PAM dataset merge handling for partial or inconsistent PAM inputs”, but the issue is still reproducible with current 34.x and 35.x snapshot builds.
So GEOT-7865 seems potentially related, but I have not confirmed that it is the actual cause.
Has anyone encountered this issue?
Could this be a known problem with merging PAM/statistics metadata from TIFFs, particularly when the numeric metadata contains locale-formatted decimal values?
If this looks like a bug, I can provide a minimal two-TIFF reproducer and file a GeoServer/GeoTools issue.
Thanks!