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
To perform the dems coregistration Coregistration, demcompare’s module performs the following steps:
Loads the input dems using the dem_tools module’s load_dem function.
Creates a Coregistration object and obtains the dem’s transformation object using the coregistration’s compute_coregistration function.
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
To perform the dems statistics Statistics, demcompare’s module performs the following steps:
Loads the input dems using the dem_tools module’s load_dem function.
Reprojects both dems to the same size and resolution using dem_tools module’s reproject_dems function.
Process the two DEMs by using the dem_processing module (see DEM processing module).
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
helpers_init module in helpers_init.py file
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.
log_conf module in log_conf.pyfile
The logconf module in demcompare contains logging configuration functions.