edl_netrc | R Documentation |
This function creates a .netrc file with Earthdata Login (EDL) credentials (username and password) and sets the necessary environment variables for GDAL to use the .netrc file.
edl_netrc(
username = default("user"),
password = default("password"),
netrc_path = edl_netrc_path(),
cookie_path = edl_cookie_path(),
cloud_config = TRUE
)
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
|
cloud_config |
set |
The function sets the environment variables GDAL_HTTP_NETRC
and GDAL_HTTP_NETRC_FILE
to enable GDAL to use the .netrc file for
EDL authentication. GDAL_HTTP_COOKIEFILE and GDAL_HTTP_COOKIEJAR are also
set to allow the authentication to store and read access cookies.
Additionally, it manages the creation of a symbolic link to the .netrc file if GDAL version is less than 3.7.0 (and thus does not support GDAL_HTTP_NETRC_FILE location).
TRUE invisibly if successful
edl_netrc()
url <- lpdacc_example_url()
terra::rast(url, vsi=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.