WMS - Austria CRS reprojection issues

Hi, some of us at the University of Salzburg are running into an old issue of reprojection to some Austrian CRSs (e.g. EPSG:31254) shifting by 200m more than they should. See:

We have a workaround (a transform override) that works for GetMap, but breaks GetFeatureInfo in the process. We think a code fix is needed, but haven’t yet dug into the source. We would like to help. I tried to comment on the issue tracker, but it seems my account would need approval?

Hi,

both issues are quite old and in the meantime GeoServer has upgraded the EPSG database:

Can you try a recent release?
When trying a recent release, if you don’t tget the desired results, try the following system variable:

-Dorg.geotools.referencing.operation.order=AreaFirst

If even that does not help, then a code change will likely be needed, in that case follow this guide:

Cheers
Andrea

Hi, thanks a lot Andrea. We can confirm this issue remains in new versions (tested on 2.27.1 and a recent 2.28 nightly). And setting -Dorg.geotools.referencing.operation.order=AreaFirst does fix the issue. But there does seem to be an underlying bug in the original transform code. In the image below you will see the different signs in the CFR ‘ex’ parameter and the 4th TOWGS84 parameter. We plan to make a PR for this when we get chance. This also affects some CRSs outside of Austria, e.g., we saw it in a Portugal CRS too.

For reference, there is a draft PR here with a potential cause of the issue, but the fix is not yet tested: [GEOT-4962]: Fix Coordinate Frame Rotation transforms [WIP] by lukesdm · Pull Request #5529 · geotools/geotools · GitHub.