nlsfi / hakunapi

OGC API Features Java server
https://github.com/nlsfi/hakunapi
MIT License
12 stars 3 forks source link

GeoToolsProjectionTransformerFactory: Handle equal crs that differ only in axis order #80

Closed jampukka closed 12 months ago

jampukka commented 1 year ago

Related issue #78

GeoToolsProjectionTransformerFactory fails to handle CoordinateReferenceSystems that differ only by their axis order. Instead it claims that the transformation is a non-op, which causes all sorts of issues further down.

So fix that by adding another check when the coordinate systems are equal when forced to lon,lat order.

One thing to note is that this uses GeoTools' own authority information for the axis order for coordinate reference systems and not the one hakunapi-configured one, which might cause confusion in some rare edge-cases but hopefully not.

jampukka commented 1 year ago

This is waiting for confirmation that these changes fix the issue, after which this will be backported to 1.2.x