After migrating from GeoServer 2.27.4 to 2.28.4, we noticed that GetMap requests on raster data with reprojection causes the PNG responses to contain an offset. The problem also occurs with GeoServer 3.0.0.
The screenshot below visualizes the problem. The BufferedImage is not aligned with its origin.
I have no clue what could cause the issue. It may be a specific bug related to the Belgian reference systems (EPSG:31370 > EPSG:3812). In ground units, the shift is about 90m.The issue also occurred requesting coordinates in (EPSG:31370 > EPSG:4326). The problem only occurs with raster data (GeoTiff) not with vector data (PostGIS).
This testcase reproduces the issue. It succeeds on 2.27.4, but fails on 2.28.4 and 3.0.0
Not aware of a specific issue for the belgian CRSs, but maybe… are you using a custom CRS defintion or a custom coordinate operation?
Anything in these sections of the documentation:
Just for completeness, we have issues too with custom projections/operations starting with 2.27.4. One of them is reported as GEOT-7917 and described a bit more in detail here: GS 2.27.5 / GT 33.5 - envelope transformations no longer working correctly . Not sure though if it’s related, but it might give you a hint for further investigations.
That issue is basically, if you have a custom operations defined, as pair of sourceSRS, targetSRS=MathTransform, but then your request for transformation is the other way ‘round: sourceCRS→ targetCRS, then that transformation is wrong and that might give you false results. In your test-case could you implement something like this:
Thanks for reporting this, @skalesse . It may be related. Nonetheless, I did some more testing and I confirm that the issue also occurs without bd72lb72_etrs89lb08.gsb NTv2 grid shift file on the class path:
I removed the jar containing the gsb file from our installation binary
I redeployed 2.28.4
I confirmed in the Reprojection Toolbox that the GSB-based transformation was no longer available
I see that GetMap WMS output still produces the offset in the output
While I fixed it to to the best of my abilities, it would be good if someone with the original datasets could try it out using a nightly build of the 3.0.x series or the 2.28.x series.
They can be found here:
Much appreciated. I can confirm that the unit test, which includes a sample of the original dataset, succeeds with your fix. We will deploy a snapshot build in our integration environment and do some further manual testing there.