Demcompare Team
Demcompare install:
python -m venv venv # virtualenv venv init
source ./venv/bin/activate # enter the virtualenv
pip install --upgrade pip
pip install demcompare[notebook]
Install Jupyter packages in previous virtualenv:
source ./venv/bin/activate # enter the virtualenv
pip install notebook rise bokeh
# add any tool you may need through pip install
Build Jupyter kernel:
python -m ipykernel install --sys-prefix --name=dc-kernel --display-name=dc-kernel
Jupyter environnement:
jupyter notebook
Demcompare aims at comparing two DEMs together.
Demcompare has several benefits:
Open to contributions: remarks, bugs, ... !
License: Apache-2.0
Web sites:
See Authors.md for full contributions in Github repository.
DEM: Digital Elevation Model. Usually means all elevation models in raster: DSM, DTM,…
DSM: Digital Surface Model. Represents the earth’s surface and includes all objects on it.
DTM: Digital Terrain Model. Represents bare ground surface without any objects like plants and buildings.
ROI: Region of Interest means a subpart of a DSM raster.
From data inputs, a coregistration optional step is executed before a statistics configurable step. A report is generated optionnally.
Some elements can be configured:
Follow https://demcompare.readthedocs.io/en/latest/userguide/inputs.html documentation
The coregistration step:
An altimetric shift is also given but not applied.
Follow https://demcompare.readthedocs.io/en/latest/userguide/coregistration.html documentation
The statistics step computes statistics on REF-SEC difference (coregistered and reprojected) depending on:
Follow https://demcompare.readthedocs.io/en/latest/userguide/statistics.html documentation.
A report is generated:
# download data samples
wget https://raw.githubusercontent.com/CNES/demcompare/master/data_samples/srtm_blurred_and_shifted.tif
wget https://raw.githubusercontent.com/CNES/demcompare/master/data_samples/srtm_ref.tif
# download demcompare predefined configuration
wget https://raw.githubusercontent.com/CNES/demcompare/master/data_samples/sample_config.json
# run demcompare
demcompare sample_config.json
Warning: Internet needed to download demo data.
demcompare sample_config.json
2023-06-24/18:38:13 :: INFO :: *** Demcompare ***
2023-06-24/18:38:13 :: INFO :: Output directory: /tmp/test_output
2023-06-24/18:38:14 :: INFO :: Input Reference DEM (REF): /tmp/./srtm_ref.tif
2023-06-24/18:38:14 :: INFO :: Input Secondary DEM (SEC): /tmp/./srtm_blurred_and_shifted.tif
2023-06-24/18:38:14 :: INFO :: [Coregistration]
2023-06-24/18:38:14 :: INFO :: Coregistration method name: nuth_kaab_internal
2023-06-24/18:38:16 :: INFO :: Coregistration results:
2023-06-24/18:38:16 :: INFO :: Planimetry 2D shift between reprojected SEC and REF:
2023-06-24/18:38:16 :: INFO :: -> row : 0.00417 m
2023-06-24/18:38:16 :: INFO :: -> col : 0.0025 m
2023-06-24/18:38:16 :: INFO :: GDAL translate bounds:
2023-06-24/18:38:16 :: INFO :: -> ulx : 40.00 , -> uly : 40.00 , -> lrx : 40.83 , -> lry : 39.17
2023-06-24/18:38:16 :: INFO :: Altimetry shift between reprojected SEC and REF (not applied):
2023-06-24/18:38:16 :: INFO :: -> alti : -0.01764540854150804 m
2023-06-24/18:38:17 :: INFO :: [Stats]
2023-06-24/18:38:17 :: INFO :: (COREG_REF-COREG_SEC) altimetric stats generation
2023-06-24/18:38:26 :: INFO :: [Report]
2023-06-24/18:38:33 :: INFO :: Generated report: /tmp/test_output/./report/published_report
|
|
initial diff | final diff |
{
"output_dir": "./test_output/",
"input_ref" : {
"path" : "./srtm_ref.tif",
"zunit" : "m"
},
"input_sec" : {
"path" : "./srtm_blurred_and_shifted.tif",
"zunit" : "m",
"nodata" : -32768
},
"coregistration": {
"method_name": "nuth_kaab_internal",
"number_of_iterations": 6,
"estimated_initial_shift_x": 0,
"estimated_initial_shift_y": 0
},
"statistics": {
"classification_layers": {
"Slope0": {
"type": "slope",
"ranges": [
0,
5,
10,
25,
45
]
}
},
"remove_outliers": "True"
},
"report": "default"
}