diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d4cfec4684676d564672ad8046aa335e028a3966 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,8 @@ +# readthedocs.yaml +# RTD configuration file + +# Required +version: 2 + +sphinx: + configuration: rtd/conf.py diff --git a/rtd/Makefile b/rtd/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..d0c3cbf1020d5c292abdedf27627c6abe25e2293 --- /dev/null +++ b/rtd/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/rtd/make.bat b/rtd/make.bat new file mode 100644 index 0000000000000000000000000000000000000000..747ffb7b3033659bdd2d1e6eae41ecb00358a45e --- /dev/null +++ b/rtd/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/rtd/source/Logo_Espace_Dev_-_coul.png b/rtd/source/Logo_Espace_Dev_-_coul.png new file mode 100644 index 0000000000000000000000000000000000000000..fa33d067a8a37c50d136ddc4b031a6443072cfca Binary files /dev/null and b/rtd/source/Logo_Espace_Dev_-_coul.png differ diff --git a/rtd/source/automatization.rst b/rtd/source/automatization.rst new file mode 100644 index 0000000000000000000000000000000000000000..51107dacc080c193b1431a837045db9d189af1ac --- /dev/null +++ b/rtd/source/automatization.rst @@ -0,0 +1,6 @@ +===================== +automatization +===================== + +.. automodule:: sen2chain.automatization + :members: diff --git a/rtd/source/cloud_mask.rst b/rtd/source/cloud_mask.rst new file mode 100644 index 0000000000000000000000000000000000000000..8bffdef66d4291790ef85b5389f93f0425d71d10 --- /dev/null +++ b/rtd/source/cloud_mask.rst @@ -0,0 +1,6 @@ +===================== +cloud_mask +===================== + +.. automodule:: sen2chain.cloud_mask + :members: diff --git a/rtd/source/cnes_logo.png b/rtd/source/cnes_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..9fa0876b1cac293d976ad1d6f55a81106095d95f Binary files /dev/null and b/rtd/source/cnes_logo.png differ diff --git a/rtd/source/colormap.rst b/rtd/source/colormap.rst new file mode 100644 index 0000000000000000000000000000000000000000..bba01a90a793a00d7b7d7a2e5112e183f4a02a2f --- /dev/null +++ b/rtd/source/colormap.rst @@ -0,0 +1,6 @@ +===================== +colormap +===================== + +.. automodule:: sen2chain.colormap + :members: diff --git a/rtd/source/conf.py b/rtd/source/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..a0edc2eb02c25677ff9dca4d1def4bb986b72367 --- /dev/null +++ b/rtd/source/conf.py @@ -0,0 +1,52 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'sen2chain' +copyright = '2023, ESPACE-DEV' +author = 'ESPACE-DEV' +release = '0.1' + +import os +import sys +sys.path.insert(0, os.path.abspath('..')) + +# math +from sphinx_math_dollar import NODE_BLACKLIST +from docutils.nodes import header,FixedTextElement, literal,math +from docutils.nodes import comment, doctest_block, image, literal_block, math_block, paragraph, pending, raw, rubric, substitution_definition, target +math_dollar_node_blacklist = (literal,math,doctest_block, image, literal_block, math_block, pending, raw,rubric, substitution_definition,target) +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = ["myst_parser",'sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.napoleon','sphinx.ext.autosummary','sphinx_math_dollar','sphinx.ext.mathjax'] + +templates_path = ['_templates'] +exclude_patterns = [] + +autodoc_member_order = 'bysource' + +mathjax_config = { + 'tex2jax': { + 'inlineMath': [ ["\\(","\\)"] ], + 'displayMath': [["\\[","\\]"] ], + }, +} + +mathjax3_config = { + "tex": { + "inlineMath": [['\\(', '\\)']], + "displayMath": [["\\[", "\\]"]], + } +} + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'sphinx_book_theme' +html_permalinks_icon = '<span>#</span>' +html_static_path = ['_static'] diff --git a/rtd/source/config.rst b/rtd/source/config.rst new file mode 100644 index 0000000000000000000000000000000000000000..9f92b01080ccce3f4b6f8aa2cfd3d8ffdfce4c99 --- /dev/null +++ b/rtd/source/config.rst @@ -0,0 +1,7 @@ +===================== +config +===================== + +.. automodule:: sen2chain.config + :members: + diff --git a/rtd/source/configure_sen2cor/index.rst b/rtd/source/configure_sen2cor/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..b78a1f3d331515315b950d9792623bbf90a6bf7a --- /dev/null +++ b/rtd/source/configure_sen2cor/index.rst @@ -0,0 +1,13 @@ +================================== +Configure sen2cor +================================== + + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + sen2cor_2_5 + sen2cor_2_8 + sen2cor_2_9 + sen2cor_2_10 diff --git a/rtd/source/configure_sen2cor/sen2cor_2_10.md b/rtd/source/configure_sen2cor/sen2cor_2_10.md new file mode 100644 index 0000000000000000000000000000000000000000..e8cdd84a5ae0c6f79526ff06c32755a06de8e0af --- /dev/null +++ b/rtd/source/configure_sen2cor/sen2cor_2_10.md @@ -0,0 +1,19 @@ +# Sen2cor 2.10 + +* Download [Sen2Cor v2.10.01](https://step.esa.int/thirdparties/sen2cor/2.10.0/Sen2Cor-02.10.01-Linux64.run) and put it to its final install directory +* Make it executable `chmod +x Sen2Cor-02.10.01-Linux64.run` +* Install Sen2Cor `./Sen2Cor-02.10.01-Linux64.run` +* Update config + * Move or symlink [ESACCI-LC package for SC module](https://earth.esa.int/eogateway/ftp/Sentinel-2/ESACCI-LC-L4-ALL-FOR-SEN2COR-2.10.tar.gz) content to Sen2Cor directory: + * `ln -s /path/to/ESACCI-LC-L4-ALL-FOR-SEN2COR-2.10/ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7.tif /Path/to/Sen2Cor-02.10.01-Linux64/lib/python2.7/site-packages/sen2cor/aux_data` + * `ln -s /path/to/ESACCI-LC-L4-WB-Map-150m-P13Y-2000-v4.0.tif Sen2Cor-02.10.01-Linux64/lib/python2.7/site-packages/sen2cor/aux_data/` + * `ln -s /path/to/ESACCI-LC-L4-Snow-Cond-500m-MONTHLY-2000-2012-v2.4 Sen2Cor-02.10.01-Linux64/lib/python2.7/site-packages/sen2cor/aux_data/` + * Create or symlink DEM directory + * `ln -s /path/to/dem ~/sen2cor/2.10/dem` + * Update Sen2Cor config file `nano ~/sen2cor/2.10/cfg/L2A_GIPP.xml` + * <DEM_Directory>dem/srtm</DEM_Directory> + * <DEM_Reference>http://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/TIFF/</DEM_Reference> + * <DEM_Terrain_Correction>FALSE</DEM_Terrain_Correction> # If you don't want DEM terrain correction + * Update Sen2Chain config file `nano ~/sen2chain_data/config/config.cfg` + * sen2cor_bashrc_path = /path/to/Sen2Cor-02.10.01-Linux64/L2A_Bashrc +* Of course you have to update Sen2Chain diff --git a/rtd/source/configure_sen2cor/sen2cor_2_5.md b/rtd/source/configure_sen2cor/sen2cor_2_5.md new file mode 100644 index 0000000000000000000000000000000000000000..8f25dce813b1909f5c6269d0f84f9441b587cbd1 --- /dev/null +++ b/rtd/source/configure_sen2cor/sen2cor_2_5.md @@ -0,0 +1,11 @@ +## Sen2cor 2.5 + +Sen2Cor v02.05.05 is still supported by Sen2Chain latest version. + +Sen2Cor install path (sen2cor_bashrc_path) in config file (\~/sen2chain_data/config/config.cfg) is used to retrieve info of the Sen2Cor version and process L1C accordingly. So please keep the default Sen2Cor install directory name unchanged (ie Sen2Cor-02.0\*.0\*-Linux64) so that Sen2Chain finds this pattern. + +_Pas certain de comment configurer 2.5.5 donc le texte suivant n'est peut etre pas utile_ + +**Sen2Cor default config**\ +Sen2Chain will not override your Sen2Cor config. You have to directly edit your Sen2Cor configuration file (default path: `\~/sen2cor/2.5/cfg/L2A_GIPP.xml`) : -> DEM_Directory and DEM_Reference paths in order to auto-download and use DEM correction. If a DEM is used the land cover data should be used to improve Sen2Cor classification algorithms. Please refer to 4.1 of Sen2Cor Configuration and User Manual (http://step.esa.int/thirdparties/sen2cor/2.8.0/docs/S2-PDGS-MPC-L2A-SUM-V2.8.pdf) for more install and configuration infos.\ +At SEAS-OI we still don't use the DEM correction as it seems not relevant in high shadow / steep slope environments (as in Reunion Island). Config file example: [L2A_GIPP.xml](/espace-dev/sen2chain/-/wikis/uploads/975660b0f1d6806891c4dd3b36feda7c/L2A_GIPP.xml) diff --git a/rtd/source/configure_sen2cor/sen2cor_2_8.md b/rtd/source/configure_sen2cor/sen2cor_2_8.md new file mode 100644 index 0000000000000000000000000000000000000000..b3f7e412f2790a98fd4dffd2c29d72e5a85b1b9a --- /dev/null +++ b/rtd/source/configure_sen2cor/sen2cor_2_8.md @@ -0,0 +1,15 @@ +# Sen2cor 2.8 + +Starting from last tag version (v0.6-rc1), Sen2Chain should be compatible with Sen2Cor v02.08.00 (Sen2Cor v02.05.05 is still supported). + +Sen2Cor install path (sen2cor_bashrc_path) in config file (~/sen2chain_data/config/config.cfg) is used to retrieve info of the Sen2Cor version and process L1C accordingly. So please keep the default Sen2Cor install directory name unchanged (ie Sen2Cor-02.0*.0*-Linux64) so that Sen2Chain finds this pattern. + + +**Sen2Cor default config**\ +Sen2Chain will not override your Sen2Cor config. You have to directly edit your Sen2Cor configuration file (default path: `~/sen2cor/2.8/cfg/L2A_GIPP.xml`) : +-> DEM_Directory and DEM_Reference paths in order to auto-download and use DEM correction. If a DEM is used the land cover data should be used to improve Sen2Cor classification algorithms. Please refer to 4.1 of Sen2Cor Configuration and User Manual (http://step.esa.int/thirdparties/sen2cor/2.8.0/docs/S2-PDGS-MPC-L2A-SUM-V2.8.pdf) for more install and configuration infos. +At SEAS-OI we still don't use the DEM correction as it seems not relevant in high shadow / steep slope environments (as in Reunion Island). Config file example: [L2A_GIPP.xml](uploads/975660b0f1d6806891c4dd3b36feda7c/L2A_GIPP.xml) + +With Sen2Cor 2.8.0, default L2A naming convention has been changed, we forced it back to the Sen2Cor 2.5.5 way, to preserve compatibility with Sen2Chain functions: +- Sen2Cor 2.8.0 default processing_baseline number is set to 99.99 => Sen2Chain forces it to previous L1C processing_baseline number +- product discriminator is now set to the time the file is processed with Sen2Cor 2.8.0 => Sen2Chain forces it to previous L1C product discriminator diff --git a/rtd/source/configure_sen2cor/sen2cor_2_9.md b/rtd/source/configure_sen2cor/sen2cor_2_9.md new file mode 100644 index 0000000000000000000000000000000000000000..d1064f5fdbfe251e979706927888dc022bdac8a6 --- /dev/null +++ b/rtd/source/configure_sen2cor/sen2cor_2_9.md @@ -0,0 +1,18 @@ +# Sen2cor 2.9 + +* Download [Sen2Cor v2.09.00 ](http://step.esa.int/main/snap-supported-plugins/sen2cor/sen2cor-v2-9/)and put it to its final install directory +* Make it executable `chmod +x Sen2Cor-02.09.00-Linux64.run` +* Install Sen2Cor `./Sen2Cor-02.09.00-Linux64.run` +* Update config + * Move or symlink <span dir="ltr">ESACCI-LC package for SC module</span> to Sen2Cor directory + * `ln -s /path/to/ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7.tif Sen2Cor-02.09.00-Linux64/lib/python2.7/site-packages/sen2cor/aux_data/` + * `ln -s /path/to/ESACCI-LC-L4-WB-Map-150m-P13Y-2000-v4.0.tif Sen2Cor-02.09.00-Linux64/lib/python2.7/site-packages/sen2cor/aux_data/` + * `ln -s /path/to/ESACCI-LC-L4-Snow-Cond-500m-P13Y7D-2000-2012-v2.0 Sen2Cor-02.09.00-Linux64/lib/python2.7/site-packages/sen2cor/aux_data/` + * Create or symlink DEM directory + * `ln -s /path/to/dem ~/sen2cor/2.9/dem` + * Update Sen2Cor config file `nano ~/sen2cor/2.9/cfg/L2A_GIPP.xml` + * <DEM_Directory>dem/srtm</DEM_Directory> + * <DEM_Reference><http://data_public:GDdci@data.cgiar-csi.org/srtm/tiles/GeoTIFF/></DEM_Reference> + * <DEM_Terrain_Correction>FALSE</DEM_Terrain_Correction> # If you don't want DEM terrain correction + * Update Sen2Chain config file `nano ~/sen2chain_data/config/config.cfg` + * sen2cor_bashrc_path = /path/to/Sen2Cor-02.09.00-Linux64/L2A_Bashrc diff --git a/rtd/source/contribute.rst b/rtd/source/contribute.rst new file mode 100644 index 0000000000000000000000000000000000000000..6bc2243fe9d3161e51482dd891c7a28133fc241f --- /dev/null +++ b/rtd/source/contribute.rst @@ -0,0 +1,5 @@ +========== +Contribute +========== + +You can submit your own developments and branches to our 'framagit <https://framagit.org/espace-dev/sen2chain>' diff --git a/rtd/source/credits.rst b/rtd/source/credits.rst new file mode 100644 index 0000000000000000000000000000000000000000..210714c90b879f6c12e521e879260d6e22ab1ff4 --- /dev/null +++ b/rtd/source/credits.rst @@ -0,0 +1,10 @@ +======= +Credits +======= + +Sen2chain was developped in the frame of Sentinel-2 Malaria project, funded by `CNES <https://cnes.fr/en>`_ (TOSCA 2017-2019), under the coordination of Vincent Herbreteau (`IRD <https://en.ird.fr>`_ - `UMR ESPACE-DEV <http://www.espace-dev.fr>`_) and Christophe Révillion (`Univ La Réunion <http://www.univ-reunion.fr/university-of-reunion-island>`_ - UMR ESPACE-DEV). This project aims to use Sentinel-2 imagery for malaria monitoring in Madagascar and South Africa. + + +.. image:: logos.png + :align: center + :alt: logos \ No newline at end of file diff --git a/rtd/source/data_request.rst b/rtd/source/data_request.rst new file mode 100644 index 0000000000000000000000000000000000000000..e63513e02cabbd204be5945ceae58cdcc76b2919 --- /dev/null +++ b/rtd/source/data_request.rst @@ -0,0 +1,6 @@ +===================== +data_request +===================== + +.. automodule:: sen2chain.data_request + :members: diff --git a/rtd/source/download_and_process.rst b/rtd/source/download_and_process.rst new file mode 100644 index 0000000000000000000000000000000000000000..c66eb782d658cfe7dda2fc09c262bf157a30d272 --- /dev/null +++ b/rtd/source/download_and_process.rst @@ -0,0 +1,7 @@ +===================== +download_and_process +===================== + +.. automodule:: sen2chain.download_and_process + :members: + diff --git a/rtd/source/esdev.png b/rtd/source/esdev.png new file mode 100644 index 0000000000000000000000000000000000000000..404ca19b68e2b141da767dc3ff570044e8396736 Binary files /dev/null and b/rtd/source/esdev.png differ diff --git a/rtd/source/esdev3.PNG b/rtd/source/esdev3.PNG new file mode 100644 index 0000000000000000000000000000000000000000..33cde6aafd0e3f5bc7b912e820ac2aed590cc5f5 Binary files /dev/null and b/rtd/source/esdev3.PNG differ diff --git a/rtd/source/esdev4.png b/rtd/source/esdev4.png new file mode 100644 index 0000000000000000000000000000000000000000..331ca2624a0605297f94322f629b4b51c5f4f596 Binary files /dev/null and b/rtd/source/esdev4.png differ diff --git a/rtd/source/espace-dev_logo.jpg b/rtd/source/espace-dev_logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2f1c8a159f56b6b872767b72e6f9804c323b9725 Binary files /dev/null and b/rtd/source/espace-dev_logo.jpg differ diff --git a/rtd/source/examples.rst b/rtd/source/examples.rst new file mode 100644 index 0000000000000000000000000000000000000000..0e705dbcd142bd3ec6a0d69828a98305026b5df0 --- /dev/null +++ b/rtd/source/examples.rst @@ -0,0 +1,6 @@ +===================== +Adding new indices +===================== + +The indice template +--------------------------------- diff --git a/rtd/source/first_steps/download_data.md b/rtd/source/first_steps/download_data.md new file mode 100644 index 0000000000000000000000000000000000000000..b65084a56f41d42d0cae8b60b9f92d334b843cdc --- /dev/null +++ b/rtd/source/first_steps/download_data.md @@ -0,0 +1,41 @@ +# Downloading data + +### By tile's number + +To use this script you need to fill in the file [download_tiles.csv](https://framagit.org/espace-dev/sen2chain/tree/master/examples/scripts/download_tiles.csv). **_dire aussi que ce script se trouve quelques part dans l'installation (examples/script)_** + +In this .csv, the only required parameter is the tile number. The other parameters are optional. If there is no start date the download will start on the earliest date, if there is no end date the download will end at the most recent acquisition. You can also filter the download with the maxclouds parameter of the Sentinel-2 images. The last two parameters are simply some informations on the localisation of the tile. + +**_INdiquer ici que les données sont mises par défuat là et sinon à l'endroit indiqué dans le fichier de configuration - est-ce qu'on laisse l1c archives etc.?_** + +For example if you write in the .csv file: + +``` +tile;start_time;end_time;max_clouds;site;nom + +40KCB;2019-01-01;;;France;Reunion +``` + +And run download_tiles.py, you will download all the images on the Reunion Island since the 1st of January 2019. + +### By tile's identifier + +To use this script you need to fill in the file [download_tiles_by_identifier.csv](https://framagit.org/espace-dev/sen2chain/tree/master/examples/scripts/download_tiles_by_identifier.csv). + +If you know exactly the data you need to download you can fill the .csv with the official identifier name of the images and then run the download_tiles_by_identifier.py. For example if you write in the .csv : + +``` +pre1_pre2_starttime_pre3_pre4_tile_pre5_endtime_maxclouds_site_nom +# add below your identifier list +S2A_MSIL1C_20190221T063511_N0207_R134_T40KCB_20190221T075913 +``` + +And then run : + +``` +python3 download_tiles.py +``` + +You will download the image of the 21th february of 2019 on the Reunion Island. + +You could list in the .csv all the identifiers of the images you need to download. diff --git a/rtd/source/first_steps/index.rst b/rtd/source/first_steps/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..8e2d1ac88747068ee5c176f3e8ffe4cffc45d0a3 --- /dev/null +++ b/rtd/source/first_steps/index.rst @@ -0,0 +1,22 @@ +=========================== +First Steps with sen2chain +=========================== + + +Sen2Chain is a processing chain that allows you to download, process and generate indice time series from Sentinel-2 satellite data. Below are some scripts developed to facilitate the use of Sen2Chain for beginners. + +These scripts work like the following : + +* a config file (.csv or .txt) allows the user to configure his query/processing +* a python script (ex: download.py) run by the user in the python command prompt. + +With this first chapter you'll learn how to use the pre-built scripts in example folder + + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + + download_data + process_data diff --git a/rtd/source/first_steps/process_data.md b/rtd/source/first_steps/process_data.md new file mode 100644 index 0000000000000000000000000000000000000000..11db40c6df77ccc8bb1f6a9c65b602a9106ed98e --- /dev/null +++ b/rtd/source/first_steps/process_data.md @@ -0,0 +1,81 @@ +# Processing sentinel products + +### With process_l2a_and_products.py + +This script processes the L1C files that have have been downloaded but have not yet been processed. In the script you can change different parameters to define the tiles number you want to process and the indices you want. + +_**Indiquer peut-être où on trouve le script et ce qu'on peut faire varier.**_ + + +The available indices are : + +* NDVI +* NDWIGAO +* NDWIMCF +* MNDWI +* BIGR +* BIRNIR +* BIBG + +_(A FAIRE : You can see the formulas of these indices on the product description page /link/ et page à créer)_ + +For example, if you want to process the L2A products and the MNDWI on the Reunion Island you must edit the python script like so: + +In \[29\]: + +``` +l2a.process_indices(["MNDWI"], True, True) +``` + +In \[35\]: + +``` +tiles = ["40KCB"] +``` + +Run the script in a console: + +``` +python3 process_l2a_and_products.py +``` + +### With multiprocessing + +#### By tile's number + +The script allows to process L1C to L2A and to generate several products. This script starts parallel processing on several cores. By default, 4 images are processed in L2A in parallel and it's the same for product calculation. + +The configuration file of this script is [process_l2a_and_indices_multiprocessing.csv](https://framagit.org/espace-dev/sen2chain/tree/master/examples/scripts/process_l2a_and_indices_multiprocessing.csv). You must fill in the number of tiles you want to download and the products you want to generate. You could also fill in the start and end date. + +For example to download and process products on all the images on the Reunion Island since the beginning of 2019: + +``` +tile;start_time;end_time;max_clouds;site;nom;indices +# max_clouds parameter not implemented yet +40KCB;2019-01-01;;;France;Reunion;NDVI/NDWIGAO/NDWIMCF/MNDWI/BIGR/BIRNIR/BIBG +``` + +And then launch into a terminal: + +``` +python3 process_l2a_and_indices_multiprocessing.py +``` + +#### By tile's identifier + +To use this script you need to fill in the [process_l2a_and_indices_by_identifier_multiprocessing.csv](https://framagit.org/espace-dev/sen2chain/-/blob/master/examples/scripts/process_l2a_and_indices_by_identifier_multiprocessing.csv) + +If you know exactly the data you need, you can fill the .csv with the official identifier name of the images and then run the download_tiles_by_identifier.py. For example if you write in the .csv : + +``` +pre1_pre2_starttime_pre3_pre4_tile_pre5_endtime_maxclouds_site_nom +\# add below your identifier list +S2A_MSIL1C_20190221T063511_N0207_R134_T40KCB_20190221T075913 +``` +And then run : + +``` +python3 process_l2a_and_indices_by_identifier_multiprocessing.py +``` + +You will download the image of the 21st february of 2019 on the Reunion Island. diff --git a/rtd/source/funding.png b/rtd/source/funding.png new file mode 100644 index 0000000000000000000000000000000000000000..27a5213d39e185c18b31c0e014eafe25a05cab5f Binary files /dev/null and b/rtd/source/funding.png differ diff --git a/rtd/source/geo_utils.rst b/rtd/source/geo_utils.rst new file mode 100644 index 0000000000000000000000000000000000000000..60b2b7198de341b5759de0809db02c8e8a607620 --- /dev/null +++ b/rtd/source/geo_utils.rst @@ -0,0 +1,6 @@ +===================== +geo_utils +===================== + +.. automodule:: sen2chain.geo_utils + :members: diff --git a/rtd/source/getting_started/configuration.rst b/rtd/source/getting_started/configuration.rst new file mode 100644 index 0000000000000000000000000000000000000000..d6c44ec1d4ff04e6ae86d3022dcf0a42c7eab5fa --- /dev/null +++ b/rtd/source/getting_started/configuration.rst @@ -0,0 +1,72 @@ +Sen2chain +========== + +Installation +-------------- + +Download Sen2Chain and install the python dependencies + +.. code-block:: + + git clone https://framagit.org/espace-dev/sen2chain.git + cd sen2chain + pip3 install --user -e . + + +Or install directly from Git : + +.. code-block:: + + python3 -m pip install git+https://framagit.org/espace-dev/sen2chain.git + + + +Update sen2chain +----------------- + +Updates are regularly made on the processing chain, it can be easily retrieved with Git. Go to the install directory, pull the last updates from Framagit, and if necessary reinstall Sen2Chain (to get new requirement libraries). + +.. code-block:: + + cd sen2chain + git pull + pip3 install --user -e . + + + +| The different configuration files are located in ~/sen2chain_data. This files are only created after the first sen2chain import in python. +| To initialize the config files you can launch: + +.. code-block:: + + python3 + >>> from sen2chain import Tile + >>> exit() + + +Sen2chain Configuration +----------------------- + +After the first launch of sen2chain, default folders are created in: + +.. code-block:: + + ~/sen2chain_data/data + + +You can change the settings by editing the configuration file: + +.. code-block:: + + ~/sen2chain_data/data/config.cfg + +Here you can configure all the paths that will receive the different data from the processing steps of sen2chain. +| In this file indicate the full path to the bashrc of your sen2cor installation to process L1C to L2A _**(ajouter ici la possibilité de mettre un autre sen2cor pour les données pré 2018)**_: + +.. code-block:: + + /path/to/Sen2Cor-02.10.01-Linux64/L2A_Bashrc + + + +**Sen2Chain is now ready to run!* diff --git a/rtd/source/getting_started/eodag.rst b/rtd/source/getting_started/eodag.rst new file mode 100644 index 0000000000000000000000000000000000000000..9da611ef708440cdac7892a3e13d86e15dbd8460 --- /dev/null +++ b/rtd/source/getting_started/eodag.rst @@ -0,0 +1,35 @@ +EODAG +====== + +| `EODDAG <https://eodag.readthedocs.io/en/stable/>`_ is a command-line tool and a Python package for searching and downloading remotely sensed images while offering a unified API for data access regardless of the data provider. + +| A specific plugin was released for the Scihub provider. Both can be installed with pip. + + +.. code-block:: + + python3 -m pip install eodag-sentinelsat + + +Hubs logins & EODAG configuration file +======================================= + +Register to Scihub, PEPS and any provider you deem relevant for your work, and get the required credentials (username/password). + +| Follow the guidelines provided in `EODAG's documentation <https://eodag.readthedocs.io/en/stable/getting_started_guide/configure.html>`_ to configure the plugin. +| You can create a dedicated configuration file or edit the default one: + +.. code-block:: + + ~/.config/eodag/eodag.yml + + +.. code-block:: + + scihub: + priority: 1 # Highest number for your preferred provider, see more in eodag documentation + api: + credentials: + username: "PLEASE_CHANGE_ME" # Your own username + password: "PLEASE_CHANGE_ME" # Your own password + diff --git a/rtd/source/getting_started/index.rst b/rtd/source/getting_started/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..b6bf0d7f6d929bb57a0ef6f4d69e777f9486790c --- /dev/null +++ b/rtd/source/getting_started/index.rst @@ -0,0 +1,16 @@ +=========================== +Getting started +=========================== + +Why sen2chain, how to install, configure it, go! + + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + intro + my_install + eodag + configuration + sen2cor diff --git a/rtd/source/getting_started/intro.rst b/rtd/source/getting_started/intro.rst new file mode 100644 index 0000000000000000000000000000000000000000..8f0bca84b1b2d40dd9f6a4a0b38ec719accb4b8c --- /dev/null +++ b/rtd/source/getting_started/intro.rst @@ -0,0 +1,16 @@ +===================================== +Why sen2chain? +===================================== + +sen2chain was developped because blablabla + +BLABLABLA + + + + + + + + +....... thomas diff --git a/rtd/source/getting_started/my_install.rst b/rtd/source/getting_started/my_install.rst new file mode 100644 index 0000000000000000000000000000000000000000..f5fea4122ed1e5a5e89dffac12b20845791ba0b7 --- /dev/null +++ b/rtd/source/getting_started/my_install.rst @@ -0,0 +1,53 @@ +Prerequisites +=============== + +Sen2chain requires pip, GDAL, Git and Sen2Cor 2.10.01 + +pip +----- +.. code-block:: + + python -m pip install --upgrade pip + +GDAL +----- +.. code-block:: + + sudo apt install gdal-bin libgdal-dev python3-gdal + +Git +---- +.. code-block:: + + sudo apt-get install git + +Sen2cor v2.10.01 +---------------- + +1. Download Sen2Cor v2.10.01 + +.. code-block:: + + wget https://step.esa.int/thirdparties/sen2cor/2.10.0/Sen2Cor-02.10.01-Linux64.run + + +2. Make it executable + +.. code-block:: + + chmod +x Sen2Cor-02.10.01-Linux64.run + + +3. Install Sen2Cor + +.. code-block:: + + ./Sen2Cor-02.10.01-Linux64.run + + +.. note:: + Installation guide and requirements for previous versions of Sen2Chain and Sen2Cor are available :ref:`here <sen2cor>`. This may be needed to process imagery from 2018 and before. + + +| You can add extra data to improve some features of sen2chain. +| These functions are not directly mobilized by sen2chain but for optimal operation you can add ESA landcover data and the SRTM. Please find the process at this page (_**page à faire avec les différentes fonctions de sen2chain**_) diff --git a/rtd/source/getting_started/sen2cor.rst b/rtd/source/getting_started/sen2cor.rst new file mode 100644 index 0000000000000000000000000000000000000000..98131a49afc8a6fe628f3728f6ff238d5694f4d3 --- /dev/null +++ b/rtd/source/getting_started/sen2cor.rst @@ -0,0 +1,43 @@ +.. _sen2cor: + +Sen2cor +========= + +Configuration of Sen2cor v2.10.01 +---------------------------------- + +1. Move or create symlink to `ESACCI-LC package for SC module <https://earth.esa.int/eogateway/ftp/Sentinel-2/ESACCI-LC-L4-ALL-FOR-SEN2COR-2.10.tar.gz>` content to Sen2Cor directory: + +.. code-block:: + + ln -s /path/to/ESACCI-LC-L4-ALL-FOR-SEN2COR-2.10/ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7.tif /Path/to/Sen2Cor-02.10.01-Linux64/lib/python2.7/site-packages/sen2cor/aux_data + +.. code-block:: + + ln -s /path/to/ESACCI-LC-L4-WB-Map-150m-P13Y-2000-v4.0.tif Sen2Cor-02.10.01-Linux64/lib/python2.7/site-packages/sen2cor/aux_data/ + +.. code-block:: + + ln -s /path/to/ESACCI-LC-L4-Snow-Cond-500m-MONTHLY-2000-2012-v2.4 Sen2Cor-02.10.01-Linux64/lib/python2.7/site-packages/sen2cor/aux_data/ + +2. Create or symlink DEM directory + +.. code-block:: + + ln -s /path/to/dem ~/sen2cor/2.10/dem + +3. Update Sen2cor configuration file ```nano ~/sen2cor/2.10/cfg/L2A_GIPP.xml``` + +.. code-block:: + + <DEM_Directory>dem/srtm</DEM_Directory> + <DEM_Reference>http://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/TIFF/</DEM_Reference> + <DEM_Terrain_Correction>FALSE</DEM_Terrain_Correction> # If you don't want DEM terrain correction + +4. Update sen2chain config file ```nano ~/sen2chain_data/config/config.cfg``` + +.. code-block:: + + sen2cor_bashrc_path = /path/to/Sen2Cor-02.10.01-Linux64/L2A_Bashrc + +Then update sen2chain diff --git a/rtd/source/going_further/Jobs.md b/rtd/source/going_further/Jobs.md new file mode 100644 index 0000000000000000000000000000000000000000..262f3fb27db1599065e1a3a2401c85a370fb0b37 --- /dev/null +++ b/rtd/source/going_further/Jobs.md @@ -0,0 +1,41 @@ +# Setting up recurrent routines : Jobs + +Sen2Chain uses jobs to execute whole processing operations (downloading L1C, computing L2A with Sen2Cor, masking clouds, and producing indices). + +Jobs config files are stored in your \~/sen2chain_data/config/jobs/. + +There is two kind of files for each job : + +- job_jid.cfg +- job_jid.py + +With _jid_ the job identifier, can be any character chain. + +```python +>>> from sen2chain import Jobs, Job +``` + +## Jobs + +The _Jobs_ class is used to list all jobs present for your user. + +```python +>>> Jobs() + job_id config_file python_script logging timing cron_status cron_timing +0 0123456789 True True False 0 5 * * * absent None +1 335 True True False 10 10 * * * absent None +2 012 True False False * * * * * absent None +3 013 True False False * * * * * absent None +``` + +Jobs can be removed using the _remove_ function and their _job_id_ identifier + +```python +>>> Jobs().remove("335") +10094:2022-03-17 17:03:35:INFO:sen2chain.jobs:Removing Python script... +10094:2022-03-17 17:03:35:INFO:sen2chain.jobs:Removing config file... +``` + +## Job + +to be filled diff --git a/rtd/source/going_further/Library.md b/rtd/source/going_further/Library.md new file mode 100644 index 0000000000000000000000000000000000000000..7bdaa8c4e5ad91e6ba45ff96603eba10bea63fb0 --- /dev/null +++ b/rtd/source/going_further/Library.md @@ -0,0 +1,100 @@ +# Working on multiple tiles : Library + +The _Library_ class offers the possibility to get information and perform some actions on all or a group of tiles. + +Initialization: + +```python +>>> from sen2chain import Library +>>> l = Library() +``` + +## Database information and management + +### Information + +- This function returns tiles in the L1C library folder + +```python +>>> l.l1c +``` + +- This function returns tiles in the L2A library folder + +```python +>>> l.l2a +``` + +- This function returns tiles in the indices library folder + +```python +>>> l.indices +``` + +### Cleaning + +The _clean_ function performs the _clean_lib_ function (See Tile Section/link) for each tile present in L1C database or in the provided list. Use the _remove = True_ parameter to effectively remove products (default value False) + +```python +>>> l.clean() # All L1C database, nothing removed +>>> l.clean(clean_list = ["40KCB", "38KND"]) # 2 tiles analysed, nothing removed +>>> l.clean(clean_list = ["38KQE"], remove = True) # 1 tile analysed, error SAFE folders removed +``` + +## Computing products + +### Computing L2A + +You can compute L2A products for multiple provided tiles using multiprocessing + +```python +>>> # Compute all missing L2A products for the 2 provided tiles, +>>> # after the specified date, +>>> # and using 6 CPU cores +>>> l.compute_l2a(tile_list = ["40KCB", "38KND"], + date_min = "2020-01-01", + nb_proc = 6) +``` + +### Computing cloudmasks + +You can compute cloudmasks products for multiple provided tiles using multiprocessing, with specific parameters (see Tile for description). + +```python +>>> l.compute_cloudmasks(tile_list = ["40KCB", "38KND"], + cm_version = "cm001", + probability = 1, + iterations = 5, + reprocess = False, + date_min = None, + date_max = None, + nb_proc = 4) +``` + +### Computing indices + +You can compute index products for multiple provided tiles using multiprocessing, with specific parameters (see Tile for description). + +```python +>>> l.compute_indices(tile_list = ["40KCB"], + indice_list = ["NDVI", "NDWIGAO"], + reprocess = False, + nodata_clouds = True, + cm_version = "cm001", + probability = 1, + iterations = 5, + date_min = None, + date_max = "2021-12-31", + nb_proc = 4) +``` + +### Computing L1C and L2A quicklooks + +You can compute quicklooks for multiple provided tiles for L1C and/or L2A products. If no tile is provided, whole L1C + L2A product database is used. You can set specific output QL resolution (default 750m/px) and specific output format (JPEG by default or TIFF). + +```python +>>> l.compute_ql(tile_list = ["40KCB"], + product_list = ["l1c", "l2a"], + resolution = 750, + jpg = True) +``` diff --git a/rtd/source/going_further/Tile.md b/rtd/source/going_further/Tile.md new file mode 100644 index 0000000000000000000000000000000000000000..01ce2e7b3b6802901b96d165802b00cf487ee5f8 --- /dev/null +++ b/rtd/source/going_further/Tile.md @@ -0,0 +1,214 @@ +# Working a single tile : Tile + +The use of the Tile object is a good way to access tile database, process l2a, cloudmasks and indices. + +First define a Tile object using its identifier (2 digits + 3 letters format) + +```python +>>> from sen2chain import Tile +>>> t = Tile("40KCB") +``` + +## Database information and management + +### Information + +You can get informations on the number of files in database, downloaded l1c, and produced l2a, cloudmasks and indices using the _info_ function. + +```python +>>> t.info +43780:2021-10-06 12:53:34:INFO:sen2chain.tiles:l1c: 344 +43780:2021-10-06 12:53:34:INFO:sen2chain.tiles:l2a: 345 +43780:2021-10-06 12:53:34:INFO:sen2chain.tiles:cloud_masks: 625 +43780:2021-10-06 12:53:34:INFO:sen2chain.tiles:ndwigao (raw / masked): 345 / 345 +43780:2021-10-06 12:53:34:INFO:sen2chain.tiles:bigr (raw / masked): 345 / 349 +43780:2021-10-06 12:53:34:INFO:sen2chain.tiles:birnir (raw / masked): 215 / 211 +43780:2021-10-06 12:53:34:INFO:sen2chain.tiles:ireci (raw / masked): 2 / 2 +43780:2021-10-06 12:53:34:INFO:sen2chain.tiles:ndwimcf (raw / masked): 345 / 345 +43780:2021-10-06 12:53:34:INFO:sen2chain.tiles:bibg (raw / masked): 211 / 211 +43780:2021-10-06 12:53:34:INFO:sen2chain.tiles:ndvi (raw / masked): 345 / 352 +43780:2021-10-06 12:53:34:INFO:sen2chain.tiles:ndre (raw / masked): 11 / 4 +43780:2021-10-06 12:53:34:INFO:sen2chain.tiles:mndwi (raw / masked): 54 / 57 +``` + +### Size + +The _size_ function retrieves the used disk space for each kind of product. Execution can take time, depending on database size, disk or network speed. Local and archived disk spaces are analysed. + +```python +>>> t.size +43780:2021-10-06 12:53:41:INFO:sen2chain.tiles:l1c: 198GB (local: 44GB / archived: 154GB) +43780:2021-10-06 12:53:45:INFO:sen2chain.tiles:l2a: 258GB (local: 65GB / archived: 192GB) +43780:2021-10-06 12:53:45:INFO:sen2chain.tiles:ndwigao: 25GB +43780:2021-10-06 12:53:45:INFO:sen2chain.tiles:bigr: 24GB +43780:2021-10-06 12:53:45:INFO:sen2chain.tiles:birnir: 15GB +43780:2021-10-06 12:53:45:INFO:sen2chain.tiles:ireci: 324MB +43780:2021-10-06 12:53:45:INFO:sen2chain.tiles:ndwimcf: 25GB +43780:2021-10-06 12:53:45:INFO:sen2chain.tiles:bibg: 15GB +43780:2021-10-06 12:53:45:INFO:sen2chain.tiles:ndvi: 25GB +43780:2021-10-06 12:53:45:INFO:sen2chain.tiles:ndre: 791MB +43780:2021-10-06 12:53:45:INFO:sen2chain.tiles:mndwi: 4GB +``` + +## Listing products + +Different functions are called to retrieve a list all database products : + +```python +>>> t.l1c # list downloaded l1c indice products +>>> t.l2a # list l2a indice products +>>> t.cloudmasks # list cloudmask products +>>> t.ndvi # list ndvi indice products +>>> t.ndwigao # list ndwi Gao indice products +>>> t.mndwi # list mndwi indice products +``` + +As a ProductList class this retrieved list of products can be reduced using multiples functions : + +```python +>>> t.l2a.products # list of product names +>>> t.l2a.dates # list of product dates +>>> t.l2a.first # the first (oldest) product in database +>>> t.l2a.last # the last (newest) product in database + +>>> t.l2a.filter_dates(date_min = "yyyy-mm-dd", date_max = "yyyy-mm-dd") # list of products between date_min and date_max +>>> t.l2a.filter_dates(date_min = "yyyy-mm-dd") # list of products after date_min +>>> t.l2a.filter_dates(date_max = "yyyy-mm-dd") # list of products before date_max + +>>> t.l2a.filter_clouds(cover_min = 0, cover_max = 100) # list of products with a cloud cover between cover_min and cover_max +>>> t.l2a.filter_clouds(cover_min = 20) # list of products with more than 20% cloud cover +>>> t.l2a.filter_clouds(cover_max = 50) # list of products with less than 50% cloud cover +``` + +Cloudmask and indice lists as CloudMaskList class objects can be reduced using 4 different functions, one for each type of cloud mask : + +```python +>>> t.cloudmasks.cm001 # list cloudmask products of type CM001 +>>> t.cloudmasks.cm002 # list cloudmask products of type CM002 +>>> t.cloudmasks.cm003 # list cloudmask products of type CM003 +>>> t.cloudmasks.cm004 # list cloudmask products of type CM004 +``` + +For cloudmasks of types CM003 and CM004 the _params_ function is used to select cloudmasks with specific parameters. See specific wiki page for cloudmasks implementation within Sen2Chain (**_to do_**). Default values are : + +- **probability**: _1_, the max pixel cloud cover % probability value (0-100) above which the pixel should be considered as cloud. Used only for CM003. +- **iterations**: _5_, the number of dilatation cycles to apply on thresholded cloudmasks. Used for CM003 & CM004 +- **cld_shad**: _True_, used with CM004 only. Boolean value for masking cloud shadows from 20m Sen2Chain Scene Classification. +- **cld_med_prob**: _True_, used with CM004. Boolean value for masking clouds with medium probability from 20m Sen2Chain Scene Classification. +- **cld_hi_prob**: _True_, used with CM004. Boolean value for masking clouds with high probability from 20m Sen2Chain Scene Classification. +- **thin_cir**: _True_, used with CM004. Boolean value for masking thin cirrus clouds from 20m Sen2Chain Scene Classification. + +```python +>>> t.cloudmasks.cm003.params() # list cloudmask products of type CM003 with default values +>>> t.cloudmasks.cm003.params(probability = 25) # list cloudmask products of type CM003 with pixel cloud probability of 25% +>>> t.cloudmasks.cm004.params() # list cloudmask products of type CM004 with default values +>>> t.cloudmasks.cm004.params(cld_shad = False) # list cloudmask products of type CM004, without considering cloud shadows +``` + +Indice lists can be filtered using one of the 3 defined functions: _raws_, _masks_, and _quicklooks_ + +```python +>>> t.ndvi.raws #list only non masked ndvi indices +>>> t.ndwigao.masks #list only masked ndwi Gao indices (by any mask) +>>> t.ndwigao.masks.cm001 #list only ndwi Gao indices masked by CM001 cloudmasks +>>> t.mndwi.quicklooks #list only mndwi indice quicklooks +``` + +## Cleaning corrupted products + +Data in image database can sometimes be corrupted during their production, while downloading and unzipping l1c products, computing l2a with Sen2Cor (frequent corruptions with old 2.5.5 Sen2Cor version), cloudmasks or indices. The _clean_lib_ function has been introduced to check for data integrity, with the possibility to remove corrupted products (whole SAFE folder). Removed products have to be downloaded / computed again. + +```python +>>> t.clean_lib() # Check corrupted products (remove nothing) +{'problems': [], 'identified_problems': 0, 'removed_problems': 0} +>>> t.clean_lib(remove = True) # Check and remove corrupted products +``` + +## Archiving products + +Archive functions offer the possibility to move L1C, L2A or both products (SAFE folders) to archive paths, specified in the configuration file (<span dir="">\~</span>/sen2chain_data/config/config.cfg). This function can be useful in case of different kind of available hardware disks (speed vs size).\ +The _size_only_ option offers the possibility to get the info, whithout moving anything (default value _False_). + +- L1C products are moved from `l1c_path` to `l1c_archive_path` +- L2A products are moved from `l2a_path` to `l2a_archive_path` + +Every moved SAFE folder is replaced by its symlink in the original product folder. L2A SAFE products can be moved only if there is no file error (_clean_lib_ function automatically performed first). + +```python +>>> t.archive_l1c() # Archive L1C products +>>> t.archive_l2a(size_only = True) # Checking L2A products ready to archive (nothing moved) +>>> t.archive_all() # Chaining L1C and L2A archive functions +``` + +## Removing products + +Two functions offers the possibility to remove the entire L1C or L2A products from database. For L2A a provided list of identifiers offers the possibility to remove specific L2A products, if nothing provided whole L2A DB is removed. + +**!!! To use with care !!!** + +```python +>>> t.remove_l1c() +>>> t.remove_l2a(identifier_list = list) +``` + +## Computing products + +Three functions are used to compute the different products from downloaded raw L1C: L2A with Sen2Cor, cloudmasks and indices. For all 3, the process is the same: entire database is scanned to identify a list of missing products for which the computing will be done. In case of no missing products, nothing is done. Each function has its own set of specific parameters (see details bellow), with these in common: + +- _date_min_ and _date_max_: the date after, date before, or time range between which the missing products will be computed. Default values _None_ results in the entire database being scanned. +- _reprocess (boolean)_: possibility to reprocess already computed products. Default value _False_. +- _nb_proc_: All products in the process list are computed using multiprocessing to reduce processing time. Default value is 4, to increase according to your hardware. Limited by the number of cores of your processor. + +### Computing L2A + +This function is used to compute missing L2A for L1C products present in the local database. Possibility to specify dates or reprocessing, see parameters above. + +```python +>>> Tile("40KCB").compute_l2a() +>>> Tile("40KCB").compute_l2a(date_min="2019-01-01", nb_proc=12) +43780:2021-10-06 13:05:17:INFO:sen2chain.tiles:All l2a products already computed +``` + +### Computing cloudmasks + +This function computes missing cloudmasks for L2A products present in local database. This stage is mandatory if you want to mask indices later. In addition to those already mentioned above, many parameters are available, depending on the cloudmask version to compute: + +- **cm_version**: _"cm001"_, _"cm002"_, _"cm003"_, or _"cm004"_. _Default value = "cm001"_. See specific wiki page for cloudmasks implementation within Sen2Chain (_to do_). +- **probability**: _DV = 1_, the max pixel cloud cover % probability value (0-100) above which the pixel should be considered as cloud. Used only for CM003. +- **iterations**: _DV = 5_, the number of dilatation cycles to apply on thresholded cloudmasks. Used for CM003 & CM004 +- **cld_shad**: _DV =_ _True_, used with CM004 only. Boolean value for masking cloud shadows from 20m Sen2Chain Scene Classification. +- **cld_med_prob**: _DV = True_, used with CM004. Boolean value for masking clouds with medium probability from 20m Sen2Chain Scene Classification. +- **cld_hi_prob**: _DV = True_, used with CM004. Boolean value for masking clouds with high probability from 20m Sen2Chain Scene Classification. +- **thin_cir**: _DV =_ _True_, used with CM004. Boolean value for masking thin cirrus clouds from 20m Sen2Chain Scene Classification. + +The output cloudmask is named according to cloudmask version and the set of parameters, and produced only if not already present. + +```python +>>> Tile("40KCB").compute_cloudmasks() +>>> Tile("40KCB").compute_cloudmasks(cm_version="cm004", + iterations=2, + cld_shad=False, + thin_cir=False, + nb_proc=8) +``` + +### Computing indices + +This function computes all missing indices for l2a products. Indices are given as a list. If indices are not provided, it will compute missing dates of already existing indices for this tile (no new indice computed). Indices won't be masked if no cloudmasks are present, you have to compute cloudmasks first. Specific parameters: + +- **nodata_clouds**: Default value _True_, to produce a second set of cloudmasked index images (cloudmasks have to be be present). If not specified CM001 will be used. For CM003 & CM004, other CM specific parameters can be adjusted. + +```python +>>> Tile("40KCB").compute_indices(["NDVI"], date_max="2020-12-31" ) +>>> Tile("40KCB").compute_indices(["NDVI"], cm_version="cm002", nb_proc=2) +``` + +### Computing quicklooks + +You can compute quicklooks for multiple provided tiles for L1C and/or L2A products. If no tile provided, whole L1C + L2A product database is used. Possibility to set specific output QL resolution (default 750m/px). Possibility to set output format JPEG (default) or TIFF. + +```python +>>> Tile("40KCB").compute_ql(product_list = ["l2a"], + resolution = 100, + jpg = False) +``` diff --git a/rtd/source/going_further/TimeSeries.md b/rtd/source/going_further/TimeSeries.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/rtd/source/going_further/index.rst b/rtd/source/going_further/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..78efd7798f9e1c06cb32275d20324abd13fffe8e --- /dev/null +++ b/rtd/source/going_further/index.rst @@ -0,0 +1,14 @@ +============================= +Going further with sen2chain +============================= + +Now you will learn how to properly use sen2chain from the command line tool + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + Tile + Library + Jobs + TimeSeries diff --git a/rtd/source/index.rst b/rtd/source/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..c6a0fd83e20ac012ab8f4c736be00577c2686052 --- /dev/null +++ b/rtd/source/index.rst @@ -0,0 +1,60 @@ +.. sen2chain documentation master file, created by + sphinx-quickstart on Fri Jan 6 15:30:06 2023. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to sen2chain's documentation! +===================================== + +Currently under development. -thomasG +| +Sen2Chain is a simple utility written in Python 3 to download and process Sentinel-2 images. +It uses the sentinelsat and peps_download packages to find and download data, and ESA's Sen2Cor processor to perform atmospheric, terrain and cirrus correction. +Main features: + +- downloading of L1C (top of atmosphere) products from Scihub and PEPS mirrors; +- processing of L1C to L2A (bottom of atmosphere) products; +- computing of radiometric indices; +- time series extraction of thoses indices; +- full automatization of the above features. + +All these features can be launched in multiprocessing. + +Contributing +Scientific projects : + +TOSCA S2-Malaria project, funded by CNES (TOSCA 2017-2020); +INTERREG Renovrisk-impact project (2018-2020). + +Development and improvment : + +Jérémy Commins ; +Pascal Mouquet ; +Charlotte Wolff. + +Conceptualization and Coordination : + +Vincent Herbreteau ; +Christophe Révillion. +| +| +Content +-------- + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + getting_started/index + first_steps/index + going_further/index + package_content + +.. toctree:: + :maxdepth: 2 + :caption: Extra: + + configure_sen2cor/index + contribute + release_hist + framagit diff --git a/rtd/source/indices.rst b/rtd/source/indices.rst new file mode 100644 index 0000000000000000000000000000000000000000..f15d28c5898a1f74e3d293641f98874f4f2d9e96 --- /dev/null +++ b/rtd/source/indices.rst @@ -0,0 +1,150 @@ +.. module:: sen2chain.indices + +===================== +Indices +===================== + +.. autosummary:: + + sen2chain.indices.Ndvi + + +.. autosummary:: + + sen2chain.indices.NdwiMcf + + +.. autosummary:: + + sen2chain.indices.NdwiGao + + +.. autosummary:: + + sen2chain.indices.Mndwi + + +.. autosummary:: + + sen2chain.indices.Ndre + + +.. autosummary:: + + sen2chain.indices.IRECI + + +.. autosummary:: + + sen2chain.indices.BIGR + + +.. autosummary:: + + sen2chain.indices.BIRNIR + + +.. autosummary:: + + sen2chain.indices.BIBG + + +.. autosummary:: + + sen2chain.indices.EVI + +================================================= + +NDVI +************* + +.. autoclass:: sen2chain.indices.Ndvi + :members: + + +================================================= + +NDWIMCF +************* + +.. autoclass:: sen2chain.indices.NdwiMcf + :members: + + +================================================= + +NDWIGAO +************* + +.. autoclass:: sen2chain.indices.Ndwigao + :members: + + +================================================= + +MNDWI +************* + +.. autoclass:: sen2chain.indices.Mndwi + :members: + + +================================================= + +NDRE +************* + +.. autoclass:: sen2chain.indices.Ndre + :members: + + +================================================= + +IRECI +************* + +.. autoclass:: sen2chain.indices.IRECI + :members: + + +================================================= + +BIGR +************* + +.. autoclass:: sen2chain.indices.BIGR + :members: + + +================================================= + +BIRNIR +************* + +.. autoclass:: sen2chain.indices.BIRNIR + :members: + + +================================================= + +BIBG +************* + +.. autoclass:: sen2chain.indices.BIBG + :members: + + +================================================= + +EVI +************* + +.. autoclass:: sen2chain.indices.EVI + :members: + + +================================================= + + +.. automodule:: sen2chain.indices + :members: diff --git a/rtd/source/indices_functions.rst b/rtd/source/indices_functions.rst new file mode 100644 index 0000000000000000000000000000000000000000..15a64918f4e512e4982c140b4c86302b3e6c2bf1 --- /dev/null +++ b/rtd/source/indices_functions.rst @@ -0,0 +1,6 @@ +===================== +indices_functions +===================== + +.. automodule:: sen2chain.indices_functions + :members: diff --git a/rtd/source/installation.rst b/rtd/source/installation.rst new file mode 100644 index 0000000000000000000000000000000000000000..992cc0e70576d1e5222128a101f70937b0b14488 --- /dev/null +++ b/rtd/source/installation.rst @@ -0,0 +1,110 @@ +===================== +Installation +===================== + +Installing sen2chain +-------------------- + +This package requires Python 3, GDAL, OTB and `Sen2Cor <http://step.esa.int/main/third-party-plugins-2/sen2cor/>`_. + +.. note:: The current version of sen2chain is not available on Windows (yet). + + +Prerequisites +^^^^^^^^^^^^^ +GDAL + +.. code-block:: console + + sudo apt install gdal-bin libgdal-dev python3-gdal + +Orfeo Toolbox (OTB) and its python bindings + +.. code-block:: console + + wget https://www.orfeo-toolbox.org/packages/OTB-6.6.1-Linux64.run + chmod +x OTB-6.6.1-Linux64.run + ./OTB-6.6.1-Linux64.run + + +As indicated in the `OTB installation +<https://www.orfeo-toolbox.org/CookBook/Installation.html#linux-x86-64>`_, you need to modify some files to have functional OTB installation : + +* To use Python3 you need in the file otbenv.profile modify ``lib/python`` into ``lib/python3``, for variable PYTHONPATH + +* You need to add a symlink to libpython3.5m.so.rh-python35-1.0 to make it works. The method is described in the FAQ on the OTB installation page. Note that you can create this symlink regardless of your version of Python3 by pointing to the file libpython3.Xm.so.. + +* Finally, you must initialize the environment each time you launch a terminal with + +.. code-block:: console + + source otbenv.profile + +You can also indicate in your user's .profile the path to ``otbenv.profile`` (example : ``source /home/user/OTB-6.6.0-Linux64/otbenv.profile``) + +Then you can install Python Numpy for OTB bindings + +.. code-block:: console + + sudo apt install python3-numpy + +Sen2Cor + +.. code-block:: console + + wget http://step.esa.int/thirdparties/sen2cor/2.5.5/Sen2Cor-02.05.05-Linux64.run + chmod +x Sen2Cor-02.05.05-Linux64.run && ./Sen2Cor-02.05.05-Linux64.run + +Install sen2chain from sources +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Python pip + +.. code-block:: console + + sudo apt install python3-pip + + +Git + +.. code-block:: console + + sudo apt-get install git + +Download Sen2Chain and install the python dependencies: + +.. code-block:: console + + git clone https://framagit.org/jebins/sen2chain.git + cd sen2chain + pip3 install --user -e . + + +Configuration +------------- + +The configuration file is located at: ``~/sen2chain_data/config/config.cfg``. +This file (and corresponding path) is only created after the first Sen2Chain import in python. + +Configure Sentinel-2 images library +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +At first launch default folders are created in ``~/sen2chain_data/data``. You can change the settings by editing the configuration file. + +Sen2cor configuration +^^^^^^^^^^^^^^^^^^^^^ + +The full path to the sen2cor bashrc file is needed to process L1C to L2A. +e.g.: ``/home/user/Sen2Cor-02.05.05-Linux64/L2A_Bashrc`` + +Hubs logins +^^^^^^^^^^^ +In order to dowload images, you need a login on the `PEPS <https://peps.cnes.fr/rocket/#/home/>`_ and `Scihub <https://scihub.copernicus.eu/dhus>`_ servers. + +* The PEPS login and password must be stored in ``~/sen2chain_data/config/peps.txt`` like so: + +.. code-block:: html + + username password + +* The Scihub login and password are stored in the configuration file. diff --git a/rtd/source/ird_logo.png b/rtd/source/ird_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..036d2d9a6c5480ea1000c07077655a3f0435463b Binary files /dev/null and b/rtd/source/ird_logo.png differ diff --git a/rtd/source/library.rst b/rtd/source/library.rst new file mode 100644 index 0000000000000000000000000000000000000000..b92617035430c823c72931863a7b29382f769054 --- /dev/null +++ b/rtd/source/library.rst @@ -0,0 +1,7 @@ +======= +library +======= + +.. automodule:: sen2chain.library + :members: + diff --git a/rtd/source/logo_framagit_funding.JPG b/rtd/source/logo_framagit_funding.JPG new file mode 100644 index 0000000000000000000000000000000000000000..d2e086f2b2e29e5f8b31c5ba37e8c6cb47304b17 Binary files /dev/null and b/rtd/source/logo_framagit_funding.JPG differ diff --git a/rtd/source/logos.png b/rtd/source/logos.png new file mode 100644 index 0000000000000000000000000000000000000000..5ca86b5d57cfa00f573e8181d2c6f09d9c1d2c50 Binary files /dev/null and b/rtd/source/logos.png differ diff --git a/rtd/source/logos_small.png b/rtd/source/logos_small.png new file mode 100644 index 0000000000000000000000000000000000000000..bf17658949a2d06fe28007a1ba30570d954174ab Binary files /dev/null and b/rtd/source/logos_small.png differ diff --git a/rtd/source/my_install.md b/rtd/source/my_install.md new file mode 100644 index 0000000000000000000000000000000000000000..5c40daa764a2424c0c9ecc94a5489d4dca779ead --- /dev/null +++ b/rtd/source/my_install.md @@ -0,0 +1,131 @@ +# Installation + +## Prerequisites + +This package requires pip3, Python 3, GDAL and Sen2Cor 2.10.01. + +Note I: The current version of sen2chain is not available on Windows (yet) + +Note II: Installation guide and requirements for previous versions of Sen2Chain and Sen2Cor are available here (_**link to another page of wiki**_). This may be needed to process imagery from 2021 and before. + +**<span dir="">GDAL</span>** + +``` +sudo apt install gdal-bin libgdal-dev python3-gdal +``` + +**<span dir="">Sen2Cor 2.10.01</span>** + +<span dir="">Download Sen2Cor v2.10.01</span> + +``` +wget https://step.esa.int/thirdparties/sen2cor/2.10.0/Sen2Cor-02.10.01-Linux64.run +``` + +Make it executable +``` +chmod +x Sen2Cor-02.10.01-Linux64.run +``` + +Install Sen2Cor +``` +./Sen2Cor-02.10.01-Linux64.run +``` +It's possible to add some data to improve some features of sen2chain. These functions are not directly mobilized by sen2chain but for optimal operation you can add ESA landcover data and the SRTM. Please find the process at this page (_**page à faire avec les différentes fonctions de sen2chain**_) + +**EODAG** + +EODDAG is a command-line tool and a Python package for searching and downloading remotely sensed images while offering a unified API for data access regardless of the data provider. A specific plugin was released for the Scihub provider. Both can be installed with pip. + +Install pip first + +``` +sudo apt install python3-pip +``` +Then EODAG + +``` +python3 -m pip install eodag-sentinelsat +``` + +## <span dir="">Install sen2chain from sources</span> + +Install Git + +``` +sudo apt-get install git +``` +Download Sen2Chain and install the python dependencies + +``` +git clone https://framagit.org/espace-dev/sen2chain.git +cd sen2chain +pip3 install --user -e . +``` + +**Or** install directly from Git: + +``` +python3 -m pip install git+https://framagit.org/espace-dev/sen2chain.git +``` + +# <span dir="">Updating sen2chain</span> + +<span dir="">Updates are regularly made on the processing chain, it can be easily retrieved with Git. Go to the install directory, pull the last updates from Framagit, and if necessary reinstall Sen2Chain (to get new requirement libraries).</span> + +``` +cd sen2chain +git pull +pip3 install --user -e . +``` + +# <span dir="">Configuration</span> + +<span dir="">The different configuration files are located in ~/sen2chain_data. This files are only created after the first sen2chain import in python. To initialize the config files you can lauch:</span> + +``` +python3 +from sen2chain import Tile +exit() +``` + +### <span dir="">Configure Sentinel-2 images library</span> + +<span dir="">After the first launch of sen2chain, default folders are created in: + +``` +~/sen2chain_data/data +``` + +<span dir="">You can change the settings by editing the configuration file:</span> + +``` +~/sen2chain_data/data/config.cfg +``` +Here you can configure all the paths that will receive the different data from the processing steps of sen2chain. In this file indicate the full path to the bashrc of your sen2cor installation to process L1C to L2A _**(ajouter ici la possibilité de mettre un autre sen2cor pour les données pré 2018)**_: + +``` +/path/to/Sen2Cor-02.10.01-Linux64/L2A_Bashrc +``` + +### <span dir="">Hubs logins</span> & EODAG configuration file + +Register to Scihub, PEPS and any provider you deem relevant for your work, and get the required credentials (username/password). + +Follow the guidelines provided in [EODAG's documentation](https://eodag.readthedocs.io/en/latest/getting_started_guide/configure.html) to configure the plugin. You can create a dedicated configuration file or edit the default one: + +``` +~/.config/eodag/eodag.yml +``` +Then + +``` +scihub: + priority: 1 # Highest number for your preferred provider, see more in eodag documentation + api: + credentials: + username: "PLEASE_CHANGE_ME" # Your own username + password: "PLEASE_CHANGE_ME" # Your own password +``` + +**<span dir="">Sen2Chain is now ready to run!</span>** \ No newline at end of file diff --git a/rtd/source/package_content.rst b/rtd/source/package_content.rst new file mode 100644 index 0000000000000000000000000000000000000000..0bf13c2f08b0ba5c891c2a909ce71d92f9883646 --- /dev/null +++ b/rtd/source/package_content.rst @@ -0,0 +1,16 @@ +===================== +User Guide +===================== + +Every package +===================== + +.. toctree:: + tiles + download_and_process + indices + library + products + sen2cor + + diff --git a/rtd/source/products.rst b/rtd/source/products.rst new file mode 100644 index 0000000000000000000000000000000000000000..363887a68472be5d468be33bb868bfcf97d7fb6a --- /dev/null +++ b/rtd/source/products.rst @@ -0,0 +1,77 @@ +.. module:: sen2chain.products + +======== +Products +======== + +Product Class +************** + +.. autosummary:: + + sen2chain.products.Product + + +.. autosummary:: + + sen2chain.products.L1cProduct + + +.. autosummary:: + + sen2chain.products.L2aProduct + + +.. autosummary:: + + sen2chain.products.NewCloudMaskProduct + + +.. autosummary:: + + sen2chain.products.IndiceProduct + + +================================================= + +Product Class +************* + +.. autoclass:: sen2chain.products.Product + :members: + + +================================================= + +L1C Product Class +***************** + +.. autoclass:: sen2chain.products.L1cProduct + :members: + + +================================================= + +L2A Product Class +***************** + +.. autoclass:: sen2chain.products.L2aProduct + :members: + +================================================= + +Cloudmask Product Class +*********************** + +.. autoclass:: sen2chain.products.NewCloudMaskProduct + :members: + + +================================================= + +Indice Product Class +******************** + +.. autoclass:: sen2chain.products.IndiceProduct + :members: + diff --git a/rtd/source/quickstart.rst b/rtd/source/quickstart.rst new file mode 100644 index 0000000000000000000000000000000000000000..63d539e7c76a0799c9f06418c062aeef4fb931dc --- /dev/null +++ b/rtd/source/quickstart.rst @@ -0,0 +1,123 @@ +===================== +Quickstart +===================== + +Managing Sentinel-2 images +-------------------------- + + +Library +^^^^^^^ + +.. code-block:: python + +Lists tiles in your library + + >>> from sen2chain import Library + >>> Library().l1c + ['40KCB', '38KQV', '38KQB'] + >>> Library().l2a + ['38KQV', '38KQB'] + +Tiles +^^^^^ + +.. code-block:: python + + >>> from sen2chain import Tile + >>> reunion = Tile("40KCB") + >>> reunion.l1c + LISTE DE PRODUITS + >>> reunion.l2a.last.date) + datetime.datetime(2018, 9, 4, 6, 35, 11) + >>> reunion.l2a.filter_dates("2018-01-01") + >>> reunion.l2a.filter_dates("2018-01-01").filter_clouds(0,20) + [TileProduct(identifier='S2A_MSIL2A_20161003T070232_N0204_R120_T38KQB_20161003T070230_NDVI_CLOUD_MASK.tif', date=datetime.datetime(2016, 10, 3, 7, 2, 32), cloud_cover=8.7407)] + >>> reunion.ndvi.filter_clouds(0,20) + >>> reunion.l2a_missings + [TileProduct(identifier='S2A_MSIL1C_20180904T063511_N0206_R134_T40KCB_20180904T090928.SAFE', date=datetime.datetime(2018, 9, 4, 6, 35, 11), cloud_cover=28.3281), + TileProduct(identifier='S2A_OPER_PRD_MSIL1C_PDMC_20160331T090121_R134_V20160328T063507_20160328T063507.SAFE', date=datetime.datetime(2016, 3, 28, 6, 35, 7), cloud_cover=1.273775), + TileProduct(identifier='S2A_OPER_PRD_MSIL1C_PDMC_20160119T023918_R134_V20160118T063524_20160118T063524.SAFE', date=datetime.datetime(2016, 1, 18, 6, 35, 24), cloud_cover=33.5), + + +Products +^^^^^^^^ +Makes it easier to work with products metadata. + +.. code-block:: python + + >>> from sen2chain import L1cProduct + >>> l1c = L1cProduct("S2A_MSIL1C_20170111T070211_N0204_R120_T38KQV_20170111T070319.SAFE") + >>> l1c = L1cProduct("S2A_OPER_PRD_MSIL1C_PDMC_20170505T161637_R134_V20151129T063512_20151129T063512.SAFE", tile="40KCB") + >>> l1c.tile + >>> l1c.sensing_start_time + >>> l1c.footprint + >>> l1c.b04 + +.. code-block:: python + + >>> from sen2chain import L2aProduct + >>> l2a = L2aProduct("") + >>> l2a.cloud_coverage_assessment + + +Downloading and processing Sentinel-2 Images +-------------------------------------------- +Downloading +^^^^^^^^^^^ +.. code-block:: python + + >>> from sen2chain import DataRequest, DownloadAndProcess + >>> request = DataRequest().from_tiles(["40KCB", "40KEC"]) + >>> request = DataRequest().from_point() + >>> request = DataRequest().from_bbox() + >>> request = DataRequest().from_file("study_sites.shp") + >>> DownloadAndProcess(request) + +Processing +^^^^^^^^^^ + +2A level processing +^^^^^^^^^^^^^^^^^^^ +Sen2cor + +.. code-block:: python + + >>> l2a = L2aProduct("") + >>> l2a.process_l2a() + +Cloud mask and radiometric indices +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: python + + >>> l2a.process_cloud_mask(buffering=True) + >>> l2a.process_indices(indices=["NDVI", "NDVI_GAO"], clouds_nodata=True, colormap=True) + + +Time Series +^^^^^^^^^^^ + +.. code-block:: python + + >>> from sen2chain import TimeSeries + >>> ts = Timeries(polygons.geojson, indices=["NDVI"], date_min="2018-01-01", date_max"2018-01-31", cover_min=0, cover_max=20) + >>> ts.data + >>> ts.to_csv() + + +Automatization +-------------- + +.. code-block:: python + + >>> auto = Automatization() + >>> auto.run() + + +.. code-block:: python + + >>> auto_ts = TimeSeriesAutomatization() + >>> auto_ts.run() + + \ No newline at end of file diff --git a/rtd/source/sen2chain_logo.png b/rtd/source/sen2chain_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2d1ea0b6434c339f9093960c9714bcc90c18e6f4 Binary files /dev/null and b/rtd/source/sen2chain_logo.png differ diff --git a/rtd/source/sen2cor.rst b/rtd/source/sen2cor.rst new file mode 100644 index 0000000000000000000000000000000000000000..b822392789ccd5cf679a67f131c99130eed5bc3a --- /dev/null +++ b/rtd/source/sen2cor.rst @@ -0,0 +1,6 @@ +======= +sen2cor +======= + +.. automodule:: sen2chain.sen2cor + :members: diff --git a/rtd/source/tiles.rst b/rtd/source/tiles.rst new file mode 100644 index 0000000000000000000000000000000000000000..9d5238e2731ebb45939a10fb39edc024bfcfb82e --- /dev/null +++ b/rtd/source/tiles.rst @@ -0,0 +1,66 @@ +.. module:: sen2chain.tiles + +===== +Tile +===== + +Constructor +************ + +.. autosummary:: + + sen2chain.tiles.Tile + + +Downloading L1C +**************** + +.. autosummary:: + + Tile.get_l1c + +Processing Tile product: +************************* + +.. autosummary:: + + Tile.compute_l2a + Tile.compute_cloudmasks + Tile.compute_indices + Tile.compute_ql + Tile.update_latest_ql + Tile.move_old_quicklooks + Tile.update_old_cloudmasks + Tile.update_old_indices + +Managing Tile library +************************* + +.. autosummary:: + + Tile.l1c + Tile.l2a + Tile.cloudmasks + Tile.l1c_missings + Tile.l2a_missings + Tile.l1c_processable + Tile.cloudmasks_missing + Tile.missing_indices + Tile.info + Tile.size + Tile.clean_lib + Tile.archive_l1c + Tile.archive_l2a + Tile.archive_all + Tile.remove_l1c + Tile.remove_l2a + Tile.init_md + +=========================================== + +.. autoclass:: sen2chain.tiles.Tile + :members: + +.. automodule:: sen2chain.tiles.Tile + :show-inheritance: + :inherited-members: diff --git a/rtd/source/time_series.rst b/rtd/source/time_series.rst new file mode 100644 index 0000000000000000000000000000000000000000..00f7271e557f86647ab8b70a6fa0bf9177a68dda --- /dev/null +++ b/rtd/source/time_series.rst @@ -0,0 +1,7 @@ +===================== +time_series +===================== + +.. automodule:: sen2chain.time_series + :members: + diff --git a/rtd/source/univ_reunion_logo.jpg b/rtd/source/univ_reunion_logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1797f6e4dae7b67597a710654079975d92ee8d74 Binary files /dev/null and b/rtd/source/univ_reunion_logo.jpg differ diff --git a/rtd/source/utils.rst b/rtd/source/utils.rst new file mode 100644 index 0000000000000000000000000000000000000000..fd863aa6e54b85318d0cdc248f10832808233950 --- /dev/null +++ b/rtd/source/utils.rst @@ -0,0 +1,6 @@ +===================== +utils +===================== + +.. automodule:: sen2chain.utils + :members: diff --git a/rtd/source/xmlparser.rst b/rtd/source/xmlparser.rst new file mode 100644 index 0000000000000000000000000000000000000000..1b15ea3d31c60e9e1f01b48b5b98ddf28202d54b --- /dev/null +++ b/rtd/source/xmlparser.rst @@ -0,0 +1,6 @@ +===================== +xmlparser +===================== + +.. automodule:: sen2chain.xmlparser + :members: