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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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.