Open adebardo opened 1 month ago
Sounds good for me!
Do you think these processing methods should be implemented similarly as other DEM
class methods, like DEM.alti_diff(other_dem=*)
, DEM.alti_diff_norm(other_dem=*)
, DEM.angular_diff(other_dem=*)
, with a core method living in a different module?
This is what is currently done for terrain attributes like DEM.slope()
which calls xdem.terrain.slope()
. Our reasoning behind having these two options available was both structural (have an independent terrain module for organisation/testing) and to keep inputs flexible for users that might want to avoid relying on the DEM
class yet still want to use these algorithms (as one can simply pass a NumPy array + transform/resolution value when calling xdem.terrain.slope()
).
And, for the curvature, it seems like the existing DEM.curvature()
could do the job!
Context
The purpose of this ticket is to implement the
dem_processing
methods fromdemcompare
intoxdem
. We propose following a similar approach as described in this [ticket]() but this time by copying thedem_processing
directory intoxdem
.This directory includes the following calculations:
Code
Once the directory is copied, the following changes need to be made:
DEM
class fromxdem
.create_dem
functionsTests
Retrieve this file: https://github.com/CNES/demcompare/blob/master/tests/dem_processing/test_dem_processing_methods.py
and make the necessary modifications.
Documentation
Add a section to the
xdem
documentation inspired bydemcompare
: https://demcompare.readthedocs.io/en/latest/userguide/statistics/dem_processing.htmlEstimation:
4 days