Preprocessing Sentinel-2 images

Set directory

Set region of interest

Select reflectance bands you want to work with

10 metre spatial resolution

20 metre spatial resolution

Set parameters

Get the list of Sentinel-2 data that will be preprocessed

1. Resample images at 20m resolution to 10m

1.1 Resample Scene Classification map

WARNING: Only if you are planning to work at 10m resolution. If you are planning to work at 20m resolution, you can skip this step!

1.2 Resample Bottom-Of-Atmosphere corrected reflectance

If you work only with Blue (B02), Green (B03), Red (B04) and NIR (B08) bands, you don't have to do the resampling step because theses reflectances are already available at 10m resolution.

This step is only necessary if you work with bands 5,6,7,8A,11,12 which are only available at 20m resolution.

2. Clip images to the extent of Region of Interest

2.1 Get list of all images to clip

WARNING: All images must be at same spatial resolution !

Check where the ROI is located in one of the image to clip

2.2 Clip images

Check if clipped image is located inside the ROI

3. Apply Scene Classification map (SCL) on reflectance images to mask invalid pixels

3.1 Get a list with all reflectance bands clipped on the ROI

3.2 Apply SCL

Check if the SCL was correctly applied