Demcompare pipeline module

The main demcompare module in demcompare_module file orchestrates the demcompare API from an input configuration file, hence, from an execution using the Demcompare CLI.

The configuration file specifies digital elevation models inputs to compare and also the pipeline to execute. This pipeline depends on the optional Coregistration and/or Statistics steps configuration.

If coregistration and/or statistics steps are to be computed, then each step orchestration will be handled by demcompare module as follows:

Coregistration step orchestration

../../_images/coreg_api.png

Fig. 12 Demcompare coregistration step orchestration

To perform the dems coregistration Coregistration, demcompare’s module performs the following steps:

  1. Loads the input dems using the dem_tools module’s load_dem function.

  2. Creates a Coregistration object and obtains the dem’s transformation object using the coregistration’s compute_coregistration function.

  3. Applies the obtained transformation to the secondary dem using the transformation’s apply_transform function.

For more details on the coregistration modules architecture, please see Coregistration module.

Statistics step orchestration

../../_images/stats_api.png

Fig. 13 Demcompare’s orchestration for statistics step.

To perform the dems statistics Statistics, demcompare’s module performs the following steps:

  1. Loads the input dems using the dem_tools module’s load_dem function.

  2. Reprojects both dems to the same size and resolution using dem_tools module’s reproject_dems function.

  3. Process the two DEMs by using the dem_processing module (see DEM processing module).

  4. Creates a Stats_processing object and obtains the stats_dataset using the stats_processing’s compute_stats function.

Note

If coregistration has previously been done, the coregistration’s objects internal dems called reproj_coreg_ref and reproj_coreg_sec are used for the altitude difference computation, so that no manual reprojection needs to be done. Please see Statistics “With coregistration step” section for more details.

Note

If only one input is provided to demcompare, this input is directly used by the dem_processing module (there is no reprojection).

For more details on the statistics modules architecture, please see Stats module.

Module files description

In this module high level parameters of the input configuration are checked and default options are set when not already defined. Some helper functions to handle the output paths from the ` are also included here.

The logconf module in demcompare contains logging configuration functions.