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

[POC] Remove richdem/gdal from tests #671

Open
6 tasks
adebardo opened this issue Dec 11, 2024 · 4 comments
Open
6 tasks

[POC] Remove richdem/gdal from tests #671

adebardo opened this issue Dec 11, 2024 · 4 comments
Labels
[POC] Conception To review Tickets needs approval about it conception

Comments

@adebardo
Copy link

Context

The goal of this ticket is to permanently remove dependencies on richdem and gdal in the xDEM project to simplify its installation.

Implementation

Currently, these dependencies are used in the tests and serve only as ground truth for terrain attributes.
We will therefore precompute these values and load them for the tests.

richdem

  • Create the following ground truth data using richdem and store them in tests/ground_truth_data:
    • slope_Horn
    • aspect_Horn
    • hillshade_Horn
    • curvature
    • profile_curvature
    • planform_curvature
  • Load them using rasterio in the test_terrain file
  • Use them as ground truth
  • Update the configuration files accordingly

gdal

Same process as above for:

  • slope_Horn: (slope, Horn)
  • aspect_Horn: (aspect, Horn)
  • hillshade_Horn: (hillshade, Horn)
  • slope_Zevenberg: (slope, Zevenberg)
  • aspect_Zevenberg: (aspect, Zevenberg)
  • hillshade_Zevenberg: (hillshade, Zevenberg)
  • tri_Riley: (TRI, Riley)
  • tri_Wilson: (TRI, Wilson)
  • tpi: (TPI, None)
  • roughness: (Roughness, None)
@adebardo adebardo added the [POC] Conception To review Tickets needs approval about it conception label Dec 11, 2024
@rhugonnet
Copy link
Member

All good for me!
Regarding where we could move the files, maybe the repo xdem-data where the current example data lives? The repo could include the gdal/richdem scripts to generate the attributes, that we would re-run only when we add new DEM example data in that repo, or if we choose to force a manual re-run?
Doing this, there would be almost no change on the xdem repo, as we already bulk-download all xdem-data files (if they don't already exist locally) during test execution using the existing routine here.

@adebardo
Copy link
Author

It's a good idea, but if we add a dependency on RichDEM to the code, then you can no longer distribute xdem-data under the MIT license.

@rhugonnet
Copy link
Member

I hadn't thought of that 😵.
We couldn't make the case that it is ultimately used only for dev/testing, like we did for xDEM, and ignore the license issue with RichDEM?
Or, as long as it's not transitive to xDEM (as used only for testing and documentation), we could also change the license of xdem-data, I don't think that'd be an issue.

@adebardo
Copy link
Author

GlacioHack/xdem-data#2 just in case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[POC] Conception To review Tickets needs approval about it conception
Projects
None yet
Development

No branches or pull requests

2 participants