rsi_download_rasters {rsi} | R Documentation |
Download specific assets from a set of STAC items
Description
Download specific assets from a set of STAC items
Usage
rsi_download_rasters(
items,
aoi,
asset_names,
sign_function = NULL,
merge = FALSE,
gdalwarp_options = c("-r", "bilinear", "-multi", "-overwrite", "-co",
"COMPRESS=DEFLATE", "-co", "PREDICTOR=2", "-co", "NUM_THREADS=ALL_CPUS"),
gdal_config_options = c(VSI_CACHE = "TRUE", GDAL_CACHEMAX = "30%", VSI_CACHE_SIZE =
"10000000", GDAL_HTTP_MULTIPLEX = "YES", GDAL_INGESTED_BYTES_AT_OPEN = "32000",
GDAL_DISABLE_READDIR_ON_OPEN = "EMPTY_DIR", GDAL_HTTP_VERSION = "2",
GDAL_HTTP_MERGE_CONSECUTIVE_RANGES = "YES", GDAL_NUM_THREADS = "ALL_CPUS",
GDAL_HTTP_USERAGENT = "rsi (https://permian-global-research.github.io/rsi/)"),
...
)
Arguments
items |
A |
aoi |
Either an sf(c) object outlining the area of interest to get
imagery for, or a |
asset_names |
The names of the assets to download. If this vector has names, then the names of the vector are assumed to be the names of assets on the STAC server, which will be renamed to the elements of the vector in the final output. |
sign_function |
A function that takes the output from |
merge |
Logical: for each asset, should data from multiple items be
merged into a single downloaded file? If |
gdalwarp_options |
Options passed to |
gdal_config_options |
Options passed to |
... |
Passed to |
Value
A data frame where columns correspond to distinct assets, rows correspond to distinct items, and cells contain file paths to the downloaded data.
Examples
aoi <- sf::st_point(c(-74.912131, 44.080410))
aoi <- sf::st_set_crs(sf::st_sfc(aoi), 4326)
aoi <- sf::st_buffer(sf::st_transform(aoi, 5070), 100)
landsat_image <- get_landsat_imagery(
aoi,
start_date = "2022-06-01",
end_date = "2022-08-30",
download_function = rsi_download_rasters
)