View source: R/UniqueCatalog.R
UniqueCatalog | R Documentation |
Sometimes several images could be available for the given day. It can be useful to have a list where for any given day there is just one row in the list. This unique row can be selected to represent either the least cloud coverage or the biggest coverage of the are of interest.
UniqueCatalog(
imageCatalog,
by = c("areaCoverage", "tileCloudCover"),
keep = names(imageCatalog)
)
imageCatalog |
|
by |
character indicating which attribute is used to select the best image per date. Can be either "areaCoverage" or "tileCloudCover". |
keep |
list of columns to keep in output. Default: all columns in input. |
By default, the returned data.frame
has the same columns as the input catalog.
User can specify a subset of columns to include in the output through the keep
parameter.
data.frame
with one row per date.
SearchCatalog
## Not run:
dsn <- system.file("extdata", "luxembourg.geojson", package = "CDSE")
aoi <- sf::read_sf(dsn, as_tibble = FALSE)
images <- SearchCatalog(aoi = aoi, from = "2023-07-01", to = "2023-07-31",
collection = "sentinel-2-l2a", with_geometry = TRUE, client = OAuthClient)
best_daily <- UniqueCatalog(images, by = "areaCoverage",
keep = c("acquisitionDate", "tileCloudCover", "areaCoverage", "satellite"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.