Open adebardo opened 1 week ago
@rhugonnet @duboise-cnes :)
Looks good! Link to our previous discussion: https://github.com/GlacioHack/geoutils/issues/602 (forgot it was in GeoUtils).
I only have a couple main remarks:
Other small remarks:
statistic
, to allow users to pass anything!stats/
submodule: https://github.com/GlacioHack/xdem/issues/378, and to deprecate our custom nmad
function into using SciPy's equivalent: https://github.com/GlacioHack/xdem/issues/349 (The SciPy one is the one to use, both NumPy and pandas have declared they don't want to support it directly, and pandas has deprecated their old mad
function). This would be the perfect occasion to do so! :smile: And I really like the idea of this function behind called in info()
for consistency!
Not so much to add to @rhugonnet comments, already large ;) Ok for statistic vs metric naming, or even stat would do for me if consistent with naming conventions in xdem. No problem to get something more accurate and expressive.
Other question: where is the status of more complex demcompare metric or stats for non scalar element such as hillshade, svf . I remember the discussion that a structure in xdem would be better to automate more "stats" possibilities than only scalar and to put the metric structure in xdem then. My question: will it be possible to automate other type of "metric"/stat such as PDF, CDF, hillshide through a pipeline with a common unified interface ? afterwards but to be sure nothing will block. Hoping I am clear.
thanks for the work
Context
It is essential for current users of demcompare, such as QI or IGN, to have a quick and concise way of obtaining a wide range of basic metrics when performing DEM analysis. This ticket aims to address this need.
Although it is clear that, thanks to its ability to work with rasters and its coupling with NumPy for basic metric calculations, we must ensure that these metrics are easy to manipulate, retrieve, and potentially process, especially for automation tasks like implementing a CLI.
Implementation
:warning: This ticket will be created under the XDEM project, but the developments will be carried out in geoutils.
We propose creating a
get_metrics()
function in the raster module.Example usage:
:warning: This function should be callable within the
.info()
method of the DEM.List of metrics:
:warning: We need to discuss the NMAD implementation in xDEM.
Tests
Add tests for the
get_metrics()
function:None
that returns all metrics.Additionally, verify the behavior of the
.info()
method.Documentation
Update the documentation for both geoutils and xDEM to include this new functionality.
Internal Testing
Ensure that it works seamlessly with xDEM.
Estimation
3 days