Skip to content

jbferet/preprocs2

Repository files navigation

preprocS2

An R package dedicated to basic preprocessing of Sentinel-2 Level-2A reflectance images

licence Build Status

preprocS2

preprocS2 is a basic wrapper of the rstac package. It aims at downloading and preparing Sentinel-2 images for further processings using R packages such as biodivMapR for spectral diversity mapping, prosail for the computation of vegetation biophysical variables, and spinr for the computation of vegetation biophysical variables or spectral indices.

Installation

devtools::install_github('jbferet/preprocS2')

Access to CDSE STAC catalog

preprocS2 uses the STAC API endpoint provided by MPC. However, some products optionally required by preprocS2 are not provided by this STAC API. This is the case for raster data corresponding to the geometry of acquisition of Sentinel-2 images.

These products are available from the STAC catalog provided by the Sentinel-hub Catalog API via Copernicus Dataspace.

To be able to download data from the Sentinel-hub STAC Catalog API via Copernicus Dataspace, create an account on the CDSE plateform, and activate the OAuth clients following this link. Then add your credentials to your ~/.Renviron:

usethis::edit_r_environ()

and add the following lines before saving the ~/.Renviron file.

PREPROCS2_CDSE_ID = "sh-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
PREPROCS2_CDSE_SECRET = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Once the R session restarted, you can use all functionalities of preprocS2.

Example

A tutorial vignette is available here.

Acknowledgments / Fundings

This research was supported by the Agence Nationale de la Recherche (ANR, France) through the young researchers project BioCop (ANR-17-CE32-0001)

About

preprocS2 is an R package dedicated to basic preprocessing of Sentinel-2 Level-2A reflectance images.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages