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

Alti diff slope norm and angular diff #673

Open
adebardo opened this issue Dec 18, 2024 · 1 comment
Open

Alti diff slope norm and angular diff #673

adebardo opened this issue Dec 18, 2024 · 1 comment
Labels
[POC] Conception To review Tickets needs approval about it conception

Comments

@adebardo
Copy link
Contributor

Context

The goal of this ticket is to implement the equivalent of dem_processing from demcompare. These are altitude difference visualizations.
Thus, the following need to be implemented:

  • AltiDiffSlopeNorm
  • AngularDiff

Code

We propose implementing these two processes directly in the DEM class, with the creation of two methods:

def alti_diff_slope_norm() and def angular_diff().

Example Usage:

dem1 = xdem.DEM("path1")
dem2 = xdem.DEM("path2")

diff = dem1 - dem2
slope_norm = diff.alti_diff_slope_norm()

The idea is to take inspiration from what is done for terrain attributes.

For alti_diff_slope_norm:

For angular_diff:

Additionally:

  • Add logging to make it clear to the user that this function only makes sense if the DEM is an altitude difference.

For Tests

Take inspiration from what was done in demcompare.

Documentation

Update the documentation.

@adebardo adebardo added the [POC] Conception To review Tickets needs approval about it conception label Dec 18, 2024
@rhugonnet
Copy link
Member

Sounds good to have those as class methods of the Raster objects, as for terrain attributes! 🙂

We have a Raster-type class for altitude differences, dDEM, that we use for elevation differences instead of DEM to avoid the confusion. It would be perfect for this. We don't have that much in there right now, but there are many class methods specific to elevation differences (volume change, uncertainty analysis) that would be more relevant here than for the DEM class.

A note though: The dDEM class is old and some aspects of it might have to be slightly adjusted, but that should not be much work. The class has not been documented much, so it can easily be reworked and re-framed, including renaming (for instance with DH that is fairly commonly used for "difference in height").

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