: an open toolbox to download and preprocess sentinel-2 data … · 2019. 5. 15. · : an open...
TRANSCRIPT
-
sen2rLuigi Ranghetti & Lorenzo Busetto · Institute for Remote Sensing of Environment – National Research Council of Italy (IREA-CNR), Milan, Italy: An Open Toolbox to Download and Preprocess Sentinel-2 Data and Time Series
Ranghetti Luigi and Busetto Lorenzo. "sen2r": An R Open Toolbox to Download and Preprocess Sentinel-2 Data and Time Series. 2019 Living Planet Symposium, Milano, 13-17/05/2019, https://lps19.esa.int
living planet symposiumC.7.05 EO Toolboxes and Apps15 May 2019 | Milan, Italy https://luigi.ranghetti.info/publication/2019-ranghetti-lps
1
2
3
4
5
→ Summary
→ Outputs
→ Accessory functions
s2_list()
s2_calcindices()
sen2cor()
s2_download()
s2_dop()
sen2r_getElements()
s2_rgb()
safe_getMetadata()
s2_tiles()
Retrieve a list of available Sentinel-2 products
Download themCorrect level-1c products locally with Sen2Cor
Create RGB images from reectancesCompute spectral indices from reectancesGet information fromSAFE lenames or from existing archive
Return the Dates Of Passage of Sentinel-2 satellites over orbits
Get metadata from image lenames produced by sen2r
Return Sentinel-2 tiles footprints as a R object
See the function reference athttp://sen2r.ranghetti.info/reference/sen2r
See the complete list athttp://sen2r.ranghetti.info/reference
Set the parameters(see the ve screenshots)✓Import / export parametersfrom/in a JSON text le
✓Send output messages to a log le instead than standard output.
✓Close the GUI (launching / not launching the processing)
✓Open the online documentation at http://sen2r.ranghetti.info
✓
12345
Example of 3 output products computed from the same Sentinel-2 image.
b
Example of a time series computed for an output product (MSAVI2 index) on the extent of a single rice eld (10 ha). Solid line and ribbon represent respectively the average value and rst and third quartiles, while letters indicates the sensors which acquired each image (2A or 2B).
c
→ Credits is developed by Luigi Ranghetti and Lorenzo Busetto (IREA-CNR), and it is released under the GNU General Public License version 3 (GPL‑3).
The functionalities to search and download Sentinel-2 data are based on the Python tool Sentinel-download by Olivier Hagolle.
To cite this library, please use the following entry:
Ranghetti L. and Busetto L. (2019). sen2r: an R toolbox to find, download and preprocess Sentinel-2 data. R package version 1.0.2. DOI: 10.5281/zenodo.1240384. URL: http://sen2r.ranghetti.info
Start
Cycle ongroups
Read parameters
Apply Sen2Cor SAFE L2A
SCL mosaic
Clip, mask and warp
Classif. Maps
Mask clouds
Surface Reflectances
Create RGBCompute indices
Spectral indices RGB images
Delete temporary files
Stop
Search SAFE
Selectedproduct
ProcessSAFE?
Cycle ondates
Download L1C
SAFE L1CDownload L2A
Extract data
SCL tiles SR tiles
Merge adjacent
SR mosaic
SR clipped
Is itavailable?
once completed
Cycle on groups
Output generation
once completed
yes
L1C L2A
no
yes
no
→ WorkflowSearch and download Sentinel-2 products matching requisites (time window, area of interest, required products);
1
if required, apply Sen2Cor to generate level-2A (atmospherically corrected reectances) Sentinel-2 archives from level-1C (top-of-atmosphere reectances);
2
apply geometric transformations (merge adjacent tiles, clip to the area of interest, reproject, resize, ...);
3
apply a cloud mask based on categories of the Scene Classication Map;4
generate RGB images (true-colour or false-colour);5
compute spectral indices;6
export required output products in a commonly used raster format.7
→ The GUIsen2r
sen2r
→ Links
→ How to use sen2rsen2r
documentation: http://sen2r.ranghetti.infosen2r
installation and dependencies: http://sen2r.ranghetti.info/articles/installation
source code: https://github.com/ranghetti/sen2r
report bugs or suggest improvements:https://github.com/ranghetti/sen2r/issues
docker container: https://hub.docker.com/r/ranghetti/sen2r
sen2r
Non interactively: launch the processing with the command
sen2r("/tmp/saved_param.json")
providing the path of a saved parameter le, or using the arguments of the function sen2r()
✓
Interactively: open the GUIby launching the function
sen2r()without arguments, and use it to set the processing parameters;then, launch the processing or export the parameters to a JSON text le.
✓ sen2r A graphical user interface based on Shiny can be used to easily set the processing parameters.
is an package which allows simplifying and automatìng searching, download and preprocessing time series of Sentinel-2 optical data over user-selected areas of interest.
Its main purpose is to facilitate, speed up and eventually automate several steps which Sentinel-2 end users commonly perform by hand (→ Workflow).
Usage is facilitated by → The GUI, while several functions are available to easily build customised processing scripts focused on Sentinel-2 data download and processing.
The possibility to launch the processing with a set of saved parameters allows users to easily build scripts devoted to automatically update an archive of Sentinel-2 products in near real-time.
sen2r
sen2r
Processed data are saved in a standardised tree, where: each subfolder corresponds to a product; output les use a short naming convention containing: the sensor (Sentinel-2A or 2B) and the level (1C or 2A), the sensing date, the Sentinel-2 orbit, the name of the Area of Interest, the product name, the original Sentinel-2 resolution (in metres).
a
-- ······
S2A2A_20180601_065_Lomellina_NDFI_10.tif
RGB(bands 11, 8, 4)
S2A2A_20180601_065_Lomellina_NDFI_10.tif
SceneClassification
S2A2A_20180601_065_Lomellina_NDFI_10.tif
NDFI index
–1–0.5–0.25–0.125
00.1250.51
b
c
AB A
AB A
A BB A A B
A
B
A
BA
B BA B
A B
A
AB
A
BA
BA
B
A B A BA
A B A
0.0
0.2
0.4
0.6
0.8
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov DecMonth (2018)
MSA
VI2
├── BOA│ ├── S2A2A_20180102_065_Lomellina_BOA_10.tif│ ├── S2A2A_20180112_065_Lomellina_BOA_10.tif│ ├── ...│ ├── S2B2A_20181213_065_Lomellina_BOA_10.tif│ └── thumbnails│ ├── S2A2A_20180102_065_Lomellina_BOA_10.jpg│ ├── S2A2A_20180102_065_Lomellina_BOA_10.jpg.aux.xml│ └── ...├── MSAVI2│ ├── S2A2A_20180102_065_Lomellina_MSAVI2_10.tif│ ├── ...│ └── thumbnails├── NDFI│ ├── S2A2A_20180102_065_Lomellina_NDFI_10.tif│ ├── ...│ └── thumbnails├── RGBb84B│ ├── S2A2A_20180102_065_Lomellina_RGBb84B_10.tif│ ├── ...│ └── thumbnails├── RGB843B│ ├── S2A2A_20180102_065_Lomellina_RGB843B_10.tif│ ├── ...│ └── thumbnails└── SCL ├── S2A2A_20180102_065_Lomellina_SCL_10.tif ├── ... └── thumbnails ├── S2A2A_20180102_065_Lomellina_SCL_10.png ├── S2A2A_20180102_065_Lomellina_SCL_10.png.aux.xml └── ...
a