Sentinel-2 satelitte data in R

The data collected since 2015 from the European Sentinel satellite is an excellent free source of satellite imagery data. In this post, we will show you how to download and process this data in R for a given region. We will use the package sen2r for this purpose. Let’s load it:

We will also load the region for which we want to get the data using the functions of the sf package:

The sen2r package allows you to retrieve and manipulate the data using a Graphical User Interface. The GUI is called by the sen2r function without attributes:

However, we will retrieve and process the Sentinel-2 data directly using the functions in this package. We will leave the familiarization with the GUI to you.

To list the images available for our region, we will use the s2_list function. Many attributes can be defined in this function, such as spatial extent (spatial_extent), temporal extent (time_interval), maximum cloud cover (max_cloud), and many more. Our function will look like this:

We can filter the images_list data table as we wish. From the retrieved list, we will retrieve the images from 2020-07-01 using sen2r:

The output folder in BOA and NDVI stores the defined transformations, the source data in the l2a folder.

The sen2r package contains many useful features that can be used for more than just the Sentinel-2 satellite data. We leave it to you to explore this package in detail.

Leave a Reply

Your email address will not be published.

Translate using Google Translate»
Social media & sharing icons powered by UltimatelySocial

Podoba Ci się nasza strona? Odwiedź nasz profil