edl_download | R Documentation |
NOTE: This should be used primarily as a fallback mechanism! EarthData Cloud resources are often best accessed directly over HTTPS without download. This allows subsets to be extracted instead of downloading unnecessary bits. Unfortunately, certain formats do not support such HTTP-based range requests (e.g. HDF4), and require the asset is downloaded to a local POSIX filesystem first.
edl_download(
href,
dest = basename(href),
auth = "netrc",
method = "curl",
username = default("user"),
password = default("password"),
netrc_path = edl_netrc_path(),
cookie_path = edl_cookie_path(),
quiet = TRUE,
...
)
href |
the https URL of the asset |
dest |
local destination |
auth |
the authentication method ("token" for Bearer tokens or "netrc" for netrc.) |
method |
The download method, either "httr" or "curl". |
username |
EarthData Login User |
password |
EarthData Login Password |
netrc_path |
Path to the .netrc file to be created. Defaults to the
appropriate R package configuration location given by |
cookie_path |
Path to the file where cookies will be stored. Defaults
to the appropriate R package configuration location given by
|
quiet |
logical default TRUE. Show progress in download? |
... |
additional arguments to |
the dest
path, invisibly
href <- lpdacc_example_url()
edl_download(href)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.