Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
=========================
Quick Use Case
=========================
Now that Sen2Chain different products were explained, a simple use case can be introduced :
If we want to compute the radiometric indices NDVI and NDWIGAO on La Reunion Island (Tile '40KCB'), for January 2023 :
**First, download the corresponding L1C products :**
.. code-block:: python
from sen2chain import Tile
Tile('40KCB').get_l1c(start="2023-01-01",end="2023-01-30")
.. note::
Tile.get_l1c() method uses EODAG to download products, and PEPS as a default EO data provider.
**Then, compute the corresponding L2A Product :**
.. code-block:: python
Tile('40KCB').compute_l2a(date_min="2023-01-01",date_max="2023-01-30", nb_proc=6)
This method only computes missing products for the given tile. Reprocessing is available by setting the parameter reprocess to True.
**Then, choose and compute a cloudmask :**
Here, we go for Cloudmask CM004, with 1 iteration of erosion-dilatation of clouds, and other parameters to default=True
.. code-block:: python
Tile('40KCB').compute_cloudmasks(cm_version='CM004', iterations = 1, date_min="2023-01-01", date_max="2023-01-30", nb_proc=6)
**Finally, compute NDVI and NDWIGAO and mask them with CM004 :**
.. code-block:: python
Tile('40KCB').compute_indices(indices=['NDVI','NDWIGAO'], cm_version='CM004', iterations = 1, date_min="2023-01-01", date_max="2023-01-30", nb_proc=6)
Multiprocessing
****************
Depending on your infrastructures, Sen2Chain processes can be launched using multiprocessing. The parameter *nb_proc* lets you select the correct number of processors you need.