Selection is done according to aoi cloud cover (in case of optical data) and temporal characteristics. Both optical and SAR records are supported as well as combined selection for different products across systems and data providers.
select_bitemporal( records, min_distance, max_sub_period, min_improvement = 5, max_cloudcov_tile = 80, satisfaction_value = 98, prio_products = c(), aoi = NULL, write_cmask_mosaic = TRUE, write_preview_mosaic = TRUE, dir_out = NULL, as_sf = TRUE, verbose = TRUE )
data.frame as returned by calc_cloudcov, either complete or subsetted but with all columns.
Records will be selected from these records. If
numeric the minimum number of days between two used acquisitions for distinguished timestamps.
For example, if a scene from 20th May 2019 is selected for a timestamp and
numeric maximum number of days to be used for creating a mosaic per timestamp if mosaicking is needed. This determines how temporally close together the selected records for one timestamp are (if mosaicking is needed).
numeric the minimum increase of valid pixels percentage in a tile when adding a record. This protects from adding large amounts of records that improve coverage by only a few pixels. Default is 100.
numeric maximum aoi cloud cover (%) a selected tile is allowed to have. The assumption is that a high cloud cover in a scene makes it unlikely that theoretically non-cloudy pixels are free from haze or shadows. Default is 80.
numeric percentage value at which mosaic is considered as cloud-free. Default is 98.
character vector optional. Product names ordered by priority. Selection is done in the order
of prio_products starting with the first product. Following products are included consecutively in case
selection was not fullfilled by previous product. Product names must be provided as returned by get_select_supported.
Landsat and MODIS can be summarized by 'Landsat' respectively 'MODIS' if no further differentiation demanded.
If prio_products is empty, given products in
sfc_POLYGON or SpatialPolygons or matrix, representing a single multi-point
(at least three points) polygon of your area-of-interest (AOI). If it is a matrix, it has to
have two columns (longitude and latitude) and at least three rows (each row representing one
#corner coordinate). If its projection is not
logical specifies if the timestamp-wise cloud mask mosaic rasters are written to file.
logical specifies if the timestamp-wise preview mosaic rasters are written to file.
logical, whether records should be returned as
records data.frame holding four additional columns:
selected_for_bitemporal logical column indicating for each record if it was selected (==TRUE).
selected_for_timestamp: numeric indicating for which timestamp the record was selected. If NA the record was selected for no timestamp.
rgb_mosaic_file: character path where the RGB preview mosaic is saved on disk.
cmask_mosaic_file: character path where the cloud mask mosaic is saved on disk.
For running the selection you have to process calc_cloudcov first.
Generally, the following products can be processed in
For the precise supported product names call get_select_supported.
When aiming at mixing two or more optical products you may order them by priority
Coupled selection of optical and SAR sensors is possible. Optical records will always
be selected first, SAR records second, in temporal accordance with the selected
This functionality creates a 'tmp' folder below
temporary files are saved. This folder will be deleted at the end of the function call.