Skip to content
Snippets Groups Projects
Commit 26d87bb2 authored by Aurore Dupuis's avatar Aurore Dupuis
Browse files

Merge branch '104-update-documentation-to-describe-how-to-detect-shaded-snow' into 'develop'

Resolve "Update documentation to describe how to detect shaded snow"

Closes #104

See merge request !100
parents 0b52bd7f 9cc108be
No related branches found
No related tags found
1 merge request!100Resolve "Update documentation to describe how to detect shaded snow"
......@@ -35,30 +35,32 @@ with launch_configuration_file.json :
```
{
"input_dir" : "XXX/SENTINEL2A_20210415-105910-624_L2A_T30TYN_C_V2-2",
"output_dir" : "XXX/output",
"dem" : "XXX/Copernicus_DSM/world.vrt",
"tcd" : "XXX/TCD_30TYN.tif",
"log" : "INFO",
"water_mask" : "XXX/eu_hydro_20m_30TYN.tif",
"config_file" : "XXX/lis_configuration.json",
"chain_version" : "1.7.1",
"product_counter" : "1"
"input_dir" : "XXX/SENTINEL2A_20210415-105910-624_L2A_T30TYN_C_V2-2",
"output_dir" : "XXX/output",
"dem" : "XXX/Copernicus_DSM/world.vrt",
"tcd" : "XXX/TCD_30TYN.tif",
"log" : "INFO",
"water_mask" : "XXX/eu_hydro_20m_30TYN.tif",
"relief_shadow_mask" : "XXX/hillshade.tif",
"config_file" : "XXX/lis_configuration.json",
"chain_version" : "1.8",
"product_counter" : "1"
}
```
All launch parameters are described in [fsc_launch_schema.json](doc/atbd/fsc_launch_schema.json)
and can be **overwritten** by the following command line options:
```
* "-i", "--input_dir" - Path to input directory, containing L2A Theia Product or this directory as zip
* "-o", "--output_dir" - Path to output directory; which will contains FSC Product
* "-l", "--log_level" - Log level between ['INFO', 'DEBUG', 'WARNING', 'ERROR'] (optional)
* "-c", "--config_file" - Path to lis configuration file
* "-d", "--dem" - Path to dem file
* "-t", "--tcd" - Path to tree cover density file (optional)
* "-w", "--water_mask" - Path to water mask file (optional)
* "-V", "--chain_version" - Chain version in the operational system (optional)
* "-n", "--product_counter" - Product counter number (optional)
* "-i", "--input_dir" - Path to input directory, containing L2A Theia Product or this directory as zip
* "-o", "--output_dir" - Path to output directory; which will contains FSC Product
* "-l", "--log_level" - Log level between ['INFO', 'DEBUG', 'WARNING', 'ERROR'] (optional)
* "-c", "--config_file" - Path to lis configuration file
* "-d", "--dem" - Path to dem file
* "-t", "--tcd" - Path to tree cover density file (optional)
* "-w", "--water_mask" - Path to water mask file (optional)
* "-s", "--relief_shadow_mask" - Path to relief shadow mask (optional)
* "-V", "--chain_version" - Chain version in the operational system (optional)
* "-n", "--product_counter" - Product counter number (optional)
```
In the following example, input directory and output_directory are overwritten from launch_configuration file
......
......@@ -21,6 +21,11 @@ This part describes the expert use of the fsc configuration file, in particular
- tcd: command line value will be used first, launch configuration value will be used as second, and finally configuration value will be used at last
#### shaded_snow
- "detect_shaded_snow": Activate or de activate shaded snow detection
- "hillshade_lim": Define hillshade limitation threshold
- "shaded_snow_pass": Define shaded snow pass threshold
#### water_mask
- water_mask_path: command line value will be used first, launch configuration value will be used as second, and finally configuration value will be used at last
......
......@@ -269,6 +269,32 @@
}
}
},
"shaded_snow": {
"id": "shaded_snow",
"properties": {
"detect_shaded_snow": {
"id": "detect_shaded_snow",
"default": true,
"description": "Activate shaded snow detection",
"title": "the detect_shaded_snow schema",
"type": "boolean"
},
"hillshade_lim": {
"id": "hillshade_lim",
"default": 0.2,
"description": "Hillshade threshold",
"title": "the hillshade_lim schema",
"type": "number"
},
"shaded_snow_pass": {
"id": "shaded_snow_pass",
"default": 160,
"description": "shaded snow threshold",
"title": "the shaded_snow_pass schema",
"type": "integer"
},
}
},
"water_mask": {
"id": "water_mask",
"properties": {
......
......@@ -22,9 +22,14 @@
"description": "Auxiliary input : tree cover density related to input product with the same resolution and extent as the input image (optional, only used for Sentinel-2)",
"type": "string"
},
"relief_shadow_mask": {
"id": "relief_shadow_mask",
"description": "Auxiliary input : hillshade related to input product with the same resolution and extent as the input image (optional)",
"type": "string"
},
"water_mask": {
"id": "water_mask",
"description": "Auxiliary input : water mask related to input product with the same resolution and extent as the input image(optional)",
"description": "Auxiliary input : water mask related to input product with the same resolution and extent as the input image (optional)",
"type": "string"
},
"log_level": {
......
......@@ -42,6 +42,11 @@
"fscOg_Eq":"fscToc/(1-tcd)",
"fscToc_Eq": "1.45*ndsi-0.01"
},
"shaded_snow": {
"detect_shaded_snow": true,
"hillshade_lim": 0.2,
"shaded_snow_pass": 160
},
"water_mask":{
"water_mask_raster_values":[1]
}
......
{
"input_dir" : "XXX/SENTINEL2A_20210415-105910-624_L2A_T30TYN_C_V2-2",
"output_dir" : "XXX/output",
"dem" : "XXX/Copernicus_DSM/world.vrt",
"tcd" : "XXX/TCD_30TYN.tif",
"log" : "INFO",
"water_mask" : "XXX/eu_hydro_20m_30TYN.tif",
"config_file" : "XXX/lis_configuration.json",
"chain_version" : "1.7.1",
"product_counter" : 1
"input_dir" : "XXX/SENTINEL2A_20210415-105910-624_L2A_T30TYN_C_V2-2",
"output_dir" : "XXX/output",
"dem" : "XXX/Copernicus_DSM/world.vrt",
"tcd" : "XXX/TCD_30TYN.tif",
"log" : "INFO",
"water_mask" : "XXX/eu_hydro_20m_30TYN.tif",
"relief_shadow_mask" : "XXX/hillshade.tif",
"config_file" : "XXX/lis_configuration.json",
"chain_version" : "1.7.1",
"product_counter" : "1"
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ These additional products are resample at the same resolution and same footprint
- 0, No-Snow
- 100, Snow
- 205, Cloud
- 254, No-data
- 255, No-data
These resampled denfication snow products are append to the empty dates of the previous collection, or fused with other products as described in the following section.
......
{
"tile_id": "T31TCH",
"input_products_list": [
"/work/OT/siaa/Theia/Neige/TEST/Data-LIS-1.6/Input-Data-Test/SNOW_PRODUCTS/SENTINEL2A_20180101-105435-457_L2A_T31TCH_D_V1-4",
"/work/OT/siaa/Theia/Neige/TEST/Data-LIS-1.6/Input-Data-Test/SNOW_PRODUCTS/SENTINEL2A_20180131-105416-437_L2A_T31TCH_D_V1-4"
"XXX/SNOW_PRODUCTS/SENTINEL2A_20180101-105435-457_L2A_T31TCH_D_V1-4",
"XXX/SNOW_PRODUCTS/SENTINEL2A_20180131-105416-437_L2A_T31TCH_D_V1-4"
],
"date_start": "01/01/2018",
"date_stop": "31/01/2018",
"output_dir": "lis/lis_install_15_10/build/Testing/Temporary/SNOW_SYNTHESIS",
"config_file": "lis/lis_install_15_10/build/Testing/Temporary/SNOW_SYNTHESIS/synthesis_configuration.json",
"output_dir": "XXX/SNOW_SYNTHESIS",
"config_file": "XXX/SNOW_SYNTHESIS/synthesis_configuration.json",
"date_margin": 10,
"densification_products_list": [
"/work/OT/siaa/Theia/Neige/TEST/Data-LIS-1.6/Input-Data-Test/SNOW_PRODUCTS/LANDSAT8-OLITIRS-XS_20180115-103629-617_L2A_T31TCH_D_V1-9",
"/work/OT/siaa/Theia/Neige/TEST/Data-LIS-1.6/Input-Data-Test/SNOW_PRODUCTS/LANDSAT8-OLITIRS-XS_20180131-103619-890_L2A_T31TCH_D_V1-9"
"XXX/SNOW_PRODUCTS/LANDSAT8-OLITIRS-XS_20180115-103629-617_L2A_T31TCH_D_V1-9",
"XXX/SNOW_PRODUCTS/LANDSAT8-OLITIRS-XS_20180131-103619-890_L2A_T31TCH_D_V1-9"
],
"log_level": "INFO",
"chain_version": null,
......
......@@ -50,6 +50,7 @@ def create_fsc_argument_parser():
- the dem file path,
- the tree cover density file path,
- the water mask file path
- the relief shadow mask path
:return: argument parser
:rtype: argparse.ArgumentParser
"""
......
......@@ -268,6 +268,28 @@ add_test(NAME s2_compare_final_mask_test
)
set_tests_properties(s2_compare_final_mask_test PROPERTIES DEPENDS s2_test)
add_test(NAME s2_hysope2
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_BINARY_DIR}/app/let_it_snow_fsc.py
-j ${DATA_TEST}/S2/hysope2/param.json
-o ${OUTPUT_TEST}/hysope2
)
add_test(NAME dem_builder_test
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/python/s2snow/dem_builder.py
"${DATA_TEST}/SRTM/sud_ouest.vrt"
"${DATA_TEST}/Landsat/LANDSAT8_OLITIRS_XS_20150312_N2A_ORTHO_SURF_CORR_PENTE_France-MetropoleD0005H0001.TIF"
"${OUTPUT_TEST}/landsat_bassies_srtm.tif"
)
add_test(NAME s2-small_zip_test
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_BINARY_DIR}/app/let_it_snow_fsc.py
-c ${DATA_TEST}/S2-SMALL-ZIP/lis_configuration.json
-i ${DATA_TEST}/S2-SMALL-ZIP/SENTINEL2A_20160217-111843-605_L2A_T29RNQ_D_V1-0.zip
-o "${OUTPUT_TEST}/s2-small-zip"
)
# -------------------------
# Shaded snow
# -------------------------
......@@ -276,8 +298,8 @@ add_test(NAME shaded_snow_test
${CMAKE_BINARY_DIR}/app/let_it_snow_fsc.py
-c ${DATA_TEST}/S2/shaded_snow/global_parameters_shaded_snow.json
-i ${DATA_TEST}/S2/SENTINEL2B_20210124-103807-070_L2A_T31TGM_C_V1-0
-d "${DATA_TEST}/S2/SENTINEL2B_20210124-103807-070_L2A_T31TGM_C_V1-0/Leman_dem_merged.tif"
-s "${DATA_TEST}/S2/SENTINEL2B_20210124-103807-070_L2A_T31TGM_C_V1-0/hillshade_mask.tif"
-d ${DATA_TEST}/S2/SENTINEL2B_20210124-103807-070_L2A_T31TGM_C_V1-0/Leman_dem_merged.tif
-s ${DATA_TEST}/S2/SENTINEL2B_20210124-103807-070_L2A_T31TGM_C_V1-0/hillshade_mask.tif
-o ${OUTPUT_TEST}/s2/shaded_snow
)
......@@ -286,7 +308,7 @@ add_test(NAME shaded_snow_no_relief_shadow_mask_test
${CMAKE_BINARY_DIR}/app/let_it_snow_fsc.py
-c ${DATA_TEST}/S2/shaded_snow/global_parameters_shaded_snow.json
-i ${DATA_TEST}/S2/SENTINEL2B_20210124-103807-070_L2A_T31TGM_C_V1-0
-d "${DATA_TEST}/S2/SENTINEL2B_20210124-103807-070_L2A_T31TGM_C_V1-0/Leman_dem_merged.tif"
-d ${DATA_TEST}/S2/SENTINEL2B_20210124-103807-070_L2A_T31TGM_C_V1-0/Leman_dem_merged.tif
-o ${OUTPUT_TEST}/s2/shaded_snow_no_relief_shadow_mask
)
......@@ -369,32 +391,6 @@ add_test(NAME snow_synthesis_without_densification_test
)
# ########################################
# New 1.7 tests
# ########################################
add_test(NAME s2_hysope2
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_BINARY_DIR}/app/let_it_snow_fsc.py
-j ${DATA_TEST}/S2/hysope2/param.json
-o ${OUTPUT_TEST}/hysope2
)
add_test(NAME dem_builder_test
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/python/s2snow/dem_builder.py
"${DATA_TEST}/SRTM/sud_ouest.vrt"
"${DATA_TEST}/Landsat/LANDSAT8_OLITIRS_XS_20150312_N2A_ORTHO_SURF_CORR_PENTE_France-MetropoleD0005H0001.TIF"
"${OUTPUT_TEST}/landsat_bassies_srtm.tif"
)
add_test(NAME s2-small_zip_test
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_BINARY_DIR}/app/let_it_snow_fsc.py
-c ${DATA_TEST}/S2-SMALL-ZIP/lis_configuration.json
-i ${DATA_TEST}/S2-SMALL-ZIP/SENTINEL2A_20160217-111843-605_L2A_T29RNQ_D_V1-0.zip
-o "${OUTPUT_TEST}/s2-small-zip"
)
if(NOT JENKINS_BUILD MATCHES "true")
# ----------------------------------
# Synthesis from 1.7 snow product
......
......@@ -18,11 +18,15 @@ For each case (take5, l8, S2 and S2-small):
* Compare snow_pass3.tif file
* Compare LIS_SNOW_ALL.TIF file
* Compare LIS_SEB.TIF file
* hysope2 integration test
* test of dem_builder
* launch let_it_snow_fsc.py on a zip file
* shaded_snow_test
* shaded_snow_no_relief_shadow_mask_test
## Synthesis
* snow_synthesis_test from 1.6 snow products
* snow_synthesis_test 1.6 snow products
* Compare SCD file
* Compare CCD file
* Compare NOBS file
......@@ -31,20 +35,9 @@ For each case (take5, l8, S2 and S2-small):
* snow_synthesis_muscate_test => synthesis on muscate case
* snow_synthesis_without_densification_test => synthesis without densification
## New LIS 1.7 tests
### FSC
* launch let_it_snow_fsc.py on hysope2 case
* launch let_it_snow_fsc.py on minimal case (without dem, tcd and water_mask)
### Synthesis
* Snow_synthesis_test from 1.7 snow products
* Compare SCD file
* Compare CCD file
* Compare NOBS file
* Compare SOD file
* Compare SMOD file
* Snow_synthesis_test from last version snow products
* Snow synthesis with zip files
* Snow synthesis with Copernicus snow products
* Snow synthesis with H2 snow products
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment