Closed
Description
Context
The purpose of this ticket is to implement the demcompare
metrics into geoutils
. We have decided not to include them in xdem
because these measurements apply specifically to rasters.
Code
We propose first to copy the metric
directory from demcompare
into geoutils
.
Example script:
import geoutils as gu
from geoutils.metric import Metric
filename_rast = gu.examples.get_path("exploradores_aster_dem")
rast = gu.Raster(filename_rast)
metric_obj = Metric("pdf")
output = metric_obj.compute_metric(rast.data)
print(output)
To do:
- Remove the
matrix_2d_metrics
file and open a ticket to move the SVF to the terrain attributes inxdem
(also check theinit
file). - Recode the
compute_surface_normal
andremove_nan_and_flatten
functions ingeoutils
.
Tests
For testing, you can retrieve and adapt the following files:
Documentation
A section should be added inspired by the demcompare documentation.
Metadata
Assignees
Labels
No labels
Activity