Commit 9231ca04 authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

DOC: forget to add documentation files to the previous commit

parent 6e0c94fe
......@@ -11,4 +11,5 @@ doc/tex/*aux
doc/tex/*log
doc/tex/*out
doc/tex/*toc
doc/tex/_minted*
......@@ -11,29 +11,24 @@ To read more about the "Centre d'Expertise Scientifique surface enneigée" (in F
* [Bulletin THEIA](https://www.theia-land.fr/sites/default/files/imce/BulletinTHEIA3.pdf#page=10)
The input files are Sentinel-2 or Landsat-8 level-2A products from the [Theai Land Data Centre](https://theia.cnes.fr/) or [SPOT-4/5 Take 5 level-2A products](https://spot-take5.org) and the SRTM digital elevation model.
The input files are Sentinel-2 or Landsat-8 level-2A products from the [Theai Land Data Centre](https://theia.cnes.fr/) or [SPOT-4/5 Take 5 level-2A products](https://spot-take5.org) and the SRTM digital elevation model reprojected at the same resolution as the input image.
## Code Example
##Usage
To build DEM data download the SRTM files corresponding to the study area and build the .vrt using gdalbuildvrt. Edit config.json file to activate preprocessing : Set "preprocessing" to true and set the vrt path.
Run the python script run_snow_detector.py with a json configuration file as unique argument:
The snow detection is performed in the Python script app/run_snow_detector.py.
Configure PYTHONPATH environment
```bash
export PYTHONPATH=${lis-build-dir}/app/:$PYTHONPATH
python run_snow_detector.py param.json
```
Run the main python script:
The snow detection is performed in the Python script [run_snow_detector.py](app/run_snow_detector.py).
```bash
run_snow_detector.py param.json
```
All the parameters of the algorithm, paths to input and output data are stored in the json file. See the provided example [param_test_s2_template.json](tes/param_test_s2_template.json) file for an example.
Moreover The JSON schema is available in the [Algorithm theoritical basis documentation](doc/tex/ATBD_CES-Neige.tex) and gives more information about the roles of these parameters.
NB: To build DEM data download the SRTM files corresponding to the study area and build the .vrt using gdalbuildvrt. Edit config.json file to activate preprocessing : Set "preprocessing" to true and set the vrt path.
There is a Bash script in app directory which allows to set the env variable and run the script:
```bash
runLis.sh param.json
```
## Products format
* COMPO: Raster image showing the outlines of the cloud (including cloud shadow) and snow masks drawn on the RGB composition of the L2A image (bands SWIR/Red/Green).
......
......@@ -30,7 +30,8 @@ pdftitle=Algorithm theoretical basis documentation for an operational snow cover
\usepackage[]{algorithm2e}
\usepackage{fancyhdr}
\usepackage{tabularx}
% \usepackage{listings}
%\usepackage{listings}
\usepackage{minted}
% \lstset{language=Matlab}
\usepackage{tikz}
......@@ -257,7 +258,7 @@ After passing the pass 1 and 2 snow tests, some pixels that were originally mark
minimum height=2em]
\tikzstyle{bigbox}=[inner sep=20pt]
\begin{figure}
\begin{figure}[H]
\begin{tikzpicture}[node distance = 3.5cm, auto]
% Place nodes
......@@ -315,9 +316,13 @@ After passing the pass 1 and 2 snow tests, some pixels that were originally mark
\caption{Flowchart of the snow detection algorithm}
\end{figure}\label{fig:flowchart}
\subsection{Parameter values}\label{par:param}
\subsection{Parameters description}\label{par:param}
\begin{table}
\subsubsection{Main algorithm parameters}\label{par:sciparam}
The table below gives the description of the main parameters of the algorithm:
\begin{table}[!htbp]
\begin{center}
\begin{tabularx}{\textwidth}{|l X l l|}
\hline
......@@ -339,7 +344,23 @@ Parameter & Description & Name in the configuration file & Default value\\
\caption{LIS algorithm parameters description and default values.}
\end{table}\label{tab:param}
Above default values related to reflectance are given as float values between 0
and 1. Threshold related to reflectance values follow the convention of
considering milli-reflectance as input (values between 0 and 1000) in the json
file. Some products can encode reflectance with other convention (floating
values between 0 and 1 or reflectance between 0 and 10000), to handle those
cases, there is a parameter 'multi' in the json configuration file which allows
to scale reflectance parameters. For instance, for products with reflectance
between 0 and 10000 you can use
\subsubsection{JSON schema of configuration file}\label{par:jsonparam}
The JSON Schema here describes the parameter file format and provide a clear, human-
and machine-readable documentation of all the algorithm parameters. JSON schema
was generated on \href{https://jsonschema.net} with the following options (with
metada and relative id).
\inputminted[tabsize=2, fontsize=\tiny]{js}{schema.json}
\section{Validation}\label{par:validation}
......
......@@ -14,7 +14,7 @@
{ \huge \bfseries Algorithm theoritical basis documentation for an operational snow cover extent product from Sentinel-2 and Landsat-8 data (Let-it-snow)\\}
\rule{\linewidth}{0.5mm}
{ \large \bfseries Simon Gascoin (CNRS/CESBIO), Manuel Grizonnet (CNES/CT/DSI), Tristan Klempka (CNES/CT/DSI)\\ }
{ \large \bfseries V1.0 - \today \\ }
{ \large \bfseries V1.0 (Updated for LIS 1.2) - \today \\ }
% \vspace{3cm}
% \includegraphics[width=1\textwidth]{./Images/Theia_en.png}
......
......@@ -7,7 +7,7 @@
"properties": {
"all_cloud_mask": {
"default": 1,
"description": "Threshold (greater than) apply to Theia cloud mask to retrieve a strict cloud mask.",
"description": "Threshold apply to Theia cloud mask to retrieve a strict cloud mask (greater than all_cloud_mask).",
"id": "all_cloud_mask",
"title": "The All_cloud_mask schema.",
"type": "integer"
......@@ -42,14 +42,14 @@
},
"shadow_in_mask": {
"default": 32,
"description": "bitmask apply to retrieve cloud shadow (cloud inside the image).",
"description": "bitmask apply to retrieve cloud shadows (for cloud inside the image).",
"id": "shadow_in_mask",
"title": "The Shadow_in_mask schema.",
"type": "integer"
},
"shadow_out_mask": {
"default": 64,
"description": "bitmask apply to retrieve cloud shadow (cloud outside the image).",
"description": "bitmask apply to retrieve cloud shadows (for cloud outside the image).",
"id": "shadow_out_mask",
"title": "The Shadow_out_mask schema.",
"type": "integer"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment