remotior_sensus.tools.preprocess_products module

Perform the preprocessing of products.

remotior_sensus.tools.preprocess_products.create_product_table(input_path, metadata_file_path=None, product=None, nodata_value=None, sensor=None, acquisition_date=None)
remotior_sensus.tools.preprocess_products.perform_preprocess(product_table, output_path, dos1_correction=False, add_bandset=None, output_prefix='', n_processes: int | None = None, available_ram: int | None = None, bandset_catalog: BandSetCatalog | None = None, progress_message=True) OutputManager

Preprocess products.

Perform preprocessing based on product table.

Parameters:
  • product_table – product table object.

  • output_path – string of output path directory.

  • dos1_correction – if True, perform DOS1 correction.

  • add_bandset – if True, create a new bandset and add output bands to it; if False, add output bands to current bandset.

  • output_prefix – optional string for output name prefix.

  • n_processes – number of parallel processes.

  • available_ram – number of megabytes of RAM available to processes.

  • bandset_catalog – BandSetCatalog object.

  • progress_message – progress message.

Returns:

Object OutputManager() with
  • paths = output list

remotior_sensus.tools.preprocess_products.preprocess(input_path, output_path, metadata_file_path=None, add_bandset=None, product=None, nodata_value=None, sensor=None, acquisition_date=None, dos1_correction=False, output_prefix='', n_processes: int | None = None, bandset_catalog: BandSetCatalog | None = None, available_ram: int | None = None, progress_message=True) OutputManager

Create table and preprocess products.

Perform image conversion to reflectance of several products.

Can calculate DOS1 corrected reflectance (Sobrino, J. et al., 2004. Land surface temperature retrieval from LANDSAT TM 5. Remote Sensing of Environment, Elsevier, 90, 434-440) approximating path radiance to path reflectance for level 1 data:

TOA reflectance = DN * reflectance_scale + reflectance_offset

path reflectance p = DNm - Dark Object reflectance = DNm * reflectance_scale + reflectance_offset - 0.01

land surface reflectance = TOA reflectance - p = (DN * reflectance_scale) - (DNm * reflectance_scale - 0.01)

Landsat’s data Collection 1 and 2 Level 1T Landsat 8-9 TOA reflectance proportional to exo-atmospheric solar irradiance in each band and the Earth-Sun distance (USGS, 2021. Landsat 8-9 Calibration and Validation (Cal/Val) Algorithm Description Document (ADD). Version 4.0. Department of the Interior U.S. Geological Survey, South Dakota)

TOA reflectance with correction for the sun angle = DN * Reflectance multiplicative scaling factor + Reflectance additive scaling factor / sin(Sun elevation)

Level 2S

Surface reflectance = DN * Reflectance multiplicative scaling factor + Reflectance additive scaling factor

Sentinel-2 data Level 1C

TOA reflectance = DN / QUANTIFICATION VALUE + OFFSET

Level 2S

Surface reflectance = DN / QUANTIFICATION VALUE + OFFSET

Parameters:
  • input_path – path containing the raster bands.

  • output_path – string of output path directory.

  • metadata_file_path – optional metadata file path.

  • dos1_correction – if True, perform DOS1 correction.

  • add_bandset – if True, create a new bandset and add output bands to it; if False, add output bands to current bandset.

  • product – product name.

  • nodata_value – nodata value.

  • sensor – sensor name.

  • acquisition_date – acquisition date.

  • output_prefix – optional string for output name prefix.

  • n_processes – number of parallel processes.

  • available_ram – number of megabytes of RAM available to processes.

  • bandset_catalog – BandSetCatalog object.

  • progress_message – progress message.

Returns:

Object OutputManager() with
  • paths = output list