Skip to content

Conversation

@SmylerMC
Copy link
Collaborator

This PR overalls the parsing of datasets from TIFF images by upgrading the Apache Commons imaging to 1.0.0-alpha5. Previous Terra++ version has to rely on a modified version of the dependency and on special treatment of TIFF files to differentiate integer and floating-point implementations. This is no longer needed as Commons Imaging now supports both format within a single intelligent implementation that handles both seamlessly.

Detailed changes:

  • upgrade apache-commons-imaging to 1.0.0-alpha5
  • add a new scalar dataset parser : parse_tiff that can parse both floating point and integer images (implemented in the ParseTiffDsp class)
  • deprecates the previous parse_tiff_auto, parse_tiff_int, parse_tiff_fp:
    • using them logs a warning
    • they call parse_tiff under the hood
  • updates the default dataset to use parse_tiff
  • since commons-imaging was the only dependency brought in from JitPack, it has been removed from the dependency repository list

These changes have existed in Terra-- for some time and have been working fine there.

We no longer need to use a custom patched version of the lib as 1.0-alpha3 has support for integer tiff and was released almost 4 years ago.

(cherry picked from commit d41f73d)

# Conflicts:
#	README.md
#	build.gradle
#	src/main/java/net/buildtheearth/terraplusplus/config/GlobalParseRegistries.java
#	src/main/java/net/buildtheearth/terraplusplus/config/scalarparse/d/ParseTiffAutoDSP.java
#	src/main/java/net/buildtheearth/terraplusplus/config/scalarparse/d/ParseTiffDSP.java
#	src/main/resources/net/buildtheearth/terraplusplus/dataset/scalar/heights.json5
1.0.0-alpha6 is also available, but adds a transitive dependency to a version of Apache commons with a CVE for no real advantage, so we stick with 1.0.0-alpha5 for now.

(cherry picked from commit ea00056)

# Conflicts:
#	build.gradle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants