David Montero Loaiza

I am a PhD candidate at RSC4Earth, University of Leipzig, engaged in harnessing high-resolution satellite imagery to develop deep learning models using multi-source Earth System Data Cubes (ESDCs). Furthermore, I am a Google Developer Expert for Google Earth Engine (GEE), making contributions in geospatial data processing using GEE, including the development of eemont and spectral. Additionally, I have developed open-source tools for remote sensing applications such as Awesome Spectral Indices, cubo and sen2nbar, aiming to enhance the accessibility and utility of remote sensing data.


Sessions

07-03
15:00
30min
Facilitating advanced Sentinel-2 analysis through a simplified computation of Nadir BRDF Adjusted Reflectance
David Montero Loaiza

The Sentinel-2 mission, pivotal to the European Space Agency's Copernicus program, features two satellites with the MultiSpectral Instrument (MSI) for high-to-medium resolution (10-60 m) imaging in visible (VIS), near-infrared (NIR), and shortwave infrared (SWIR) bands. Its 180° satellite phasing allows for a 5-day revisit time at the equator, essential for Earth Observation (EO) tasks. Sentinel-2 Surface Reflectance (SR) is crucial in detailed Earth surface analysis. However, for enhanced accuracy in SR data, it is imperative to perform adjustments that simulate a nadir viewing perspective (Roy et al., 2016). This correction mitigates the directional effects caused by the anisotropy of SR and the variability in sunlight and satellite viewing angles. Such adjustments are essential for the consistent comparison of images captured at different times and under varying conditions. This is particularly critical for processing and analysing Earth System Data Cubes (ESDCs, Mahecha et al., 2020), which are increasingly used due to their organised spatiotemporal structure and the ease of their generation from cloud-stored data (Montero et al., 2023).

The MODIS BRDF/Albedo product presents spectral Bidirectional Reflectance Distribution Function (BRDF) model parameters, enabling the calculation of directional reflectance across any specified sensor viewing and solar angles. Building on this foundation, Roy et al. (2008, 2016) introduced a novel approach leveraging MODIS BRDF parameters, named the c-factor, for the adjustment of Landsat SR data. This adjustment produces Nadir BRDF Adjusted Reflectance (NBAR) by multiplying the observed Landsat SR with the ratio of reflectances predicted by the MODIS BRDF model for both the observed Landsat SR and a standard nadir view under fixed solar zenith conditions. Subsequently, Roy et al. (2017) expanded this method to include adjustments for multiple Sentinel-2 spectral bands (VIS to SWIR).

While the c-factor method facilitates straightforward computation for individual Sentinel-2 images, there is a notable absence of a unified Python framework to apply this conversion uniformly across multiple images, especially for ESDCs derived from cloud-stored data.

To bridge this gap, we introduce “sen2nbar,” a Python package specifically developed to convert Sentinel-2 SR data to NBAR. This tool is versatile, aiming for converting both individual images and ESDCs generated from cloud-stored data, thus streamlining the conversion process for Sentinel-2 data users.

The "sen2nbar" package, meticulously designed for simplicity, facilitates the direct conversion of Sentinel-2 Level 2A (L2A) SR data to NBAR through a single function. To streamline this process, the package is segmented into multiple modules, each dedicated to specific tasks within the NBAR computation pipeline. These modules include functions for extracting sun and sensor viewing angles from metadata, calculating geometric and volumetric kernels, computing the BRDF model, and determining the c-factor.

“sen2nbar” supports NBAR calculations for three distinct data structures:

  1. Complete scenes via SAFE files: Users can input a local SAFE file from a Sentinel-2 L2A scene. The package processes this file, generating a new folder where each spectral band is adjusted to NBAR at its original resolution. The adjusted images are saved as Cloud Optimised GeoTIFF (COG) files, with an option for users to choose standard GeoTIFF formats instead.

  2. Xarray Data Arrays via “stackstac”: For ESDCs obtained as xarray data array objects from a SpatioTemporal Asset Catalog (STAC) using stackstac and pystac-client, “sen2nbar” requires the xarray object, the STAC endpoint, and the Sentinel-2 L2A collection name. This information allows the package to access STAC for metadata retrieval necessary for adjusting the data cube. The spatial coverage and resolution in this scenario might differ from complete scenes, and "sen2nbar" adjusts only the specific area and timeframe retrieved for the given resolution.

  3. Xarray Data Arrays via “cubo”: When users have ESDCs formed as xarray data arrays through cubo, which builds upon stackstac and incorporates the STAC endpoint and the collection name as attributes, “sen2nbar” directly adjusts these to NBAR, utilising the methodology described in the stackstac case.

For the latter two scenarios, “sen2nbar” works without writing files to disk, instead returning an xarray data array object containing the NBAR values. The package is designed to handle available bands without errors for missing bands, acknowledging that users may not require all bands and might have generated ESDCs with selected bands. Additionally, if the input arrays are ‘lazy’ arrays, created using dask arrays (a default in stackstac or cubo), “sen2nbar” executes calculations in parallel, ensuring efficient computation of NBAR values.

Importantly, “sen2nbar” automatically harmonises SR data for images with a processing baseline of 04.00 or higher before performing NBAR, ensuring consistency and accuracy in the processed data.

"sen2nbar" efficiently computes NBAR values from Sentinel-2 L2A SR data. The software supports complete SAFE files processing as well as the adjustment of ESDCs sourced from STAC and COG files, utilising tools such as “stackstac” and “cubo”. This versatility is encapsulated in a streamlined design, allowing for the adjustment of various data formats through a single, user-friendly tool, adapted to diverse user requirements.

"sen2nbar" is anticipated to become a key resource for geospatial Python users, especially in Earth System research. This tool is set to improve analyses conducted by scientists and students by significantly reducing the time and effort traditionally spent on technical adjustments. Its impact is expected to be particularly profound for multitemporal analyses, facilitating more efficient and streamlined investigations. This includes Artificial Intelligence (AI) research, particularly for studies involving multidimensional EO data. By utilising "sen2nbar", AI-based research can achieve more reliable outcomes, enhancing the overall quality and credibility of the findings.

The “sen2nbar” package is open-source and readily available on GitHub (https://github.com/ESDS-Leipzig/sen2nbar) under an MIT License. This encourages contributions from the global community, fostering collaborative development and continuous improvement. While prior experience in Remote Sensing can be advantageous for users, it is not a prerequisite for using it. The package is equipped with comprehensive documentation and tutorials, all designed to be beginner-friendly and facilitate easy adoption of the package.

Academic track
Omicum