demcompare.stats_processing

Mainly contains the StatsProcessing class for stats computation of an input dem

Module Contents

Classes

StatsProcessing

StatsProcessing class

class demcompare.stats_processing.StatsProcessing(cfg: Dict, dem: xarray.Dataset = None, dem_processing_method: str = None)[source]

StatsProcessing class

_DEFAULT_GLOBAL_LAYER_NAME = 'global'[source]
_DEFAULT_GLOBAL_LAYER[source]
_REMOVE_OUTLIERS = False[source]
_DEFAULT_METRICS[source]
fill_conf(cfg: demcompare.internal_typing.ConfigType = None)[source]

Init Stats options from configuration

Parameters:

cfg (ConfigType) – Input demcompare configuration

_create_classif_layers()[source]

Create the classification layer objects

compute_stats(classification_layer: List[str] = None, metrics: List[dict | str] = None) demcompare.stats_dataset.StatsDataset[source]

Compute DEM stats

If no classification layer is given, all classification layers are considered If no metrics are given, all metrics are considered

Parameters:
  • classification_layer (List[str]) – names of the layers

  • metrics (List[Union[dict, str]]) – List of metrics to be computed

Returns:

stats dataset

Return type:

StatsDataset

static show_all_available_metrics() str[source]

Return a string showing all available values :return: output_metrics :rtype: str

show_available_classification_layers() list[source]