iota2.common.tools.merge_s2_acquisitions

Merge S2 theia format duplicates dates.

This module is dedicated to detect and merge all Sentinel-2 acquisitions (THEIA’s format) that were taken on the same day.

If the directory in_s2_dir/T31PGM contains two acquisitions : ‘SENTINEL2B_20180421-101701-205_L2A_T31PGM_C_V2-2’ and ‘SENTINEL2B_20180421-101755-322_L2A_T31PGM_C_V2-2’ then a new directory will be created as ‘out_s2_dir/T31PGM/SENTINEL2B_20180421-xxxxxx-xxx_L2A_T31PGM_C_V2-2’

The reflectance we are trying to merge are B2, B3, B4, B5, B6, B7, B8, B8A, B11, B12, and STACK if exists only with the the slope correction (FRE) and masks CLM_R1.tif, EDG_R1.tif, SAT_R1.tif

Functions

CreateBandMathApplication(OtbParameters)

IN: parameter consistency are not tested here (done in otb's applications) every value could be string

CreateBandMathXApplication(OtbParameters)

IN: parameter consistency are not tested here (done in otb's applications) every value could be string

date_from_s2_acquisition(dir_name)

Exctract date as string in s2 dir name.

detect_duplicated_s2(s2_dir)

Detect same date acquisitions in a iota2 compatible s2_path.

main()

Define the conda entry point.

merge(s2_paths, output_dir[, available_ram])

Merge all Sentinel-2 acquisitions that were acquired on the same day.

merge_masks(s2_paths, ...)

Merge Sentinel-2 masks if they are found.

merge_refl(s2_paths, output_acquisition_dir, ...)

Merge Sentinel-2 reflectance if they are found.

merge_s2_acquisitions(in_dir, out_dir[, ...])

Merge all same date Sentinel-2 acquisitions (THEIA's format).

sort_by_first_elem(my_list)

Example 1:

sort_dates(s2_paths)

Sort date using no data percent, the lowest get the higher priority.

Classes

Path(*args, **kwargs)

PurePath subclass that can make system calls.

product

product(*iterables, repeat=1) --> product object