Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for transformation from epsg:3857 with wrong results #1562

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

stempler
Copy link
Member

We were experimenting a bit with transformations from EPSG:3857 that are producing wrong results, specifically to EPSG:31468 / EPSG:4314 where data would be moved by ~20 km.

Example:
grafik-20230317-111301

Debugging the transformation we could not really pinpoint where the things go wrong.

So for now we here implemented a workaround to get correct results, by having WGS 84 as an intermediate step in the transformation.
This is definitely not pretty and an actual fix would be preferable, but I was wondering if something like this workaround would in principle be something that you would consider to be added to the codebase. Thanks!

@copierrj
Copy link
Member

What problem is being solved exactly by adding an additional test dependency (com.sun.xml.ws:jaxws-rt)?

@stempler
Copy link
Member Author

stempler commented Aug 24, 2023

What problem is being solved exactly by adding an additional test dependency (com.sun.xml.ws:jaxws-rt)?

@copierrj The error is a NoClassDefFoundError for org.codehaus.stax2.XMLInputFactory2. The error may also surface as CRS failing to load (because the CRSManager fails to initialize due to the NoClassDefFoundError).
I used the com.sun.xml.ws:jaxws-rt dependency because I saw that stax2 was not used directly as dependency so far, but this. So instead of defining a new one I reused this one.

This is unrelated to the CRS transformation issue, I just needed it to run the tests. As mentioned in the related commit message tests would fail for me otherwise:

  • with Maven and Java 17 (did not test with Java 11, maybe related to the message OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=permit; support was removed in 17.0)
  • in IntelliJ with Java 11

@stempler
Copy link
Member Author

This is unrelated to the CRS transformation issue, I just needed it to run the tests. As mentioned in the related commit message tests would fail for me otherwise:

  • with Maven and Java 17 (did not test with Java 11, maybe related to the message OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=permit; support was removed in 17.0)
  • in IntelliJ with Java 11

Also observed this with Java 11 (OpenJDK) and Maven 3.9:

$ mvn -version
Apache Maven 3.9.0 (9b58d2bad23a66be161c4664ef21ce219c2c8584)
Maven home: /home/simon/apps/apache-maven-3.9.0
Java version: 11.0.20.1, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.15.0-83-generic", arch: "amd64", family: "unix"

So no idea how the tests run on other systems, but for me a large amount of tests fail without the additional dependencies.

@stempler
Copy link
Member Author

Any feedback on the actual topic of the PR?
As the tests seem to run on your infrastructure without the NoClassDefFoundErrors, I can drop the commit extending the test dependencies.

@copierrj
Copy link
Member

copierrj commented Oct 4, 2023

Java 17 is not supported yet by deegree, but any Java 11 JDK should be sufficient to build deegree (and run the tests) without any additional dependencies needed.

If you remove the commit introducing the new dependency and Jenkins subsequently is able to successfully build and test it we're ready to merge your PR.

To work around problems when transforming from World Mercator to other
reference system use WGS 84 as intermediate CRS to transform to.
@stempler stempler marked this pull request as ready for review October 5, 2023 10:51
@stempler
Copy link
Member Author

stempler commented Oct 5, 2023

Thanks! I updated the PR.

@copierrj
Copy link
Member

FYI: we're currently experiencing problems on our build server. We'll get back to this PR when these problems are resolved.

@tfr42 tfr42 added the bug error issue and bug (fix) label Nov 2, 2023
@tfr42 tfr42 added this to the 3.5.3 milestone Nov 2, 2023
@stephanr stephanr merged commit f7672e7 into deegree:main Nov 2, 2023
@tfr42 tfr42 added crs CRS sub-system core deegree core modules labels Nov 2, 2023
@tfr42 tfr42 changed the title workaround for transformation from epsg:3857 with wrong results Workaround for transformation from epsg:3857 with wrong results Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug error issue and bug (fix) core deegree core modules crs CRS sub-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants