This tutorial describes the processing workflow for biodivMapR. It goes through the different steps for the production of spectral diversity maps using Sentinel-2 imagery. The workflow is divided into three steps:

  • Acquisition of the Sentinel-2 imagery Sentinel-2 is downloaded from a STAC catalog using the package preprocS2, which is a wrapper of the rstac and CDSE packages.

The default STAC collection is sentinel-2-l2a from the Planetary computer catalog.

  • Preparation of the data biodivMapR requires a raster / set of raster as input data. The first biodivMapR v1 used spectral transformations as initial pre-processing step. This included reflectance normalization with a continuum removal, followed by a spctral transformation (PCA, SPCA, MNF…).

biodivMapR v2 now allows user to run the preprocessing step of their choice. This can consist in computing spectral indices, vegetation biophysical variables, or spectral transformation. This also means that any type of input data can be used, as long as the input rasters share the same footprint, spatial resolution and projection.

We provide a few examples here. Users can experiment with the method of their choice

  • Definition of the processing parameters This includes the following information:

    • input / output files paths
    • output spatial resolution (window size)
    • pre-processing and processing options
  • Computation of the diversity maps This includes several diversity metrics:

biodivMapR v1

Please refer to the branch dev_v1 of the package for the previous versions and tutorials. Vignettes and tutorials corresponding to this version are still available here.

We recommend using the most-up-to-date versions of biodivMapR, as the previous ones will not be maintained.