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

Add apply_z_correction Parameter to warp_dem Function #670

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

vschaffn
Copy link
Contributor

Resolves #643.

Description

This pull request introduces a new parameter, apply_z_correction, to the warp_dem function. This enhancement allows users to control whether vertical correction (Z-offset) is applied during the DEM warping process. The default behavior remains the same, with the Z-correction applied. However, users can now disable this correction by setting apply_z_correction=False.

Changes

  • apply_z_correction parameter: A boolean parameter was added to the warp_dem function and the BlockwiseCoreg class to allow toggling of Z-offset application. When set to False, the Z-adjustment step is skipped during the warping process.

Test Update

  • The test for warp_dem has been updated to ensure that the function works as expected when apply_z_correction=False.
  • The test also verifies that the function correctly undoes the transformation when the Z-correction is disabled, ensuring the output remains consistent with the original DEM.

@rhugonnet
Copy link
Member

Great! Just a small comment on the tests! 🙂

On the topic of blockwise: Did you get any new idea about the edge artefacts that it creates while working on it, see example here?
I wonder if we should try to find the source of those (that are probably from warp_dem) before improving the functionality further (in case we have to scrap existing code).

@adebardo adebardo merged commit 524311d into GlacioHack:main Dec 16, 2024
19 checks passed
@vschaffn vschaffn deleted the 643-z_offset branch December 16, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants