View source: R/stac_download.R
| stac_download | R Documentation |
Downloads assets from STAC items returned by stac_search() or
stac_items(). Wraps rstac::assets_download() with tidy output.
stac_download(items, assets = NULL, output_dir = tempdir(), overwrite = FALSE)
items |
An rstac |
assets |
Character vector. Asset names to download (e.g.,
|
output_dir |
Character. Directory where files are saved.
Defaults to |
overwrite |
Logical. Overwrite existing files? Defaults to |
The rstac items object (invisibly) with assets downloaded to
output_dir. Downloaded file paths can be retrieved with
rstac::assets_url().
# Search for items first
items <- stac_search(
url = "https://earth-search.aws.element84.com/v1",
collections = "sentinel-2-l2a",
bbox = c(-84.5, 38.0, -84.3, 38.2),
limit = 1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.