Calls geedim Initialize() method. This method should be called at the beginning of each session.
gd_initialize(
private_key_file = NULL,
credentials = NULL,
cloud_api_key = NULL,
url = "https://earthengine-highvolume.googleapis.com",
http_transport = NULL,
project = NULL,
quiet = FALSE
)
gd_is_initialized(..., quiet = TRUE)character. Optional: Path to JSON file containing service account credentials. (Deprecated in v0.3.0: use GOOGLE_APPLICATION_CREDENTIALS environment variable instead. If provided and GOOGLE_APPLICATION_CREDENTIALS is not set, the file path will be used to set that environment variable.)
Default: NULL uses Google Application Default Credentials (ADC) to find credentials automatically. Can be set to a pre-existing credential object if needed.
An optional API key to use the Cloud API. Default: NULL.
The base url for the EarthEngine REST API to connect to. Defaults to "High Volume" endpoint: "https://earthengine-highvolume.googleapis.com"
The HTTP transport method to use when making requests. Default: NULL
The client project ID or number to use when making API calls. Default: NULL will check GOOGLE_CLOUD_QUOTA_PROJECT, GOOGLE_CLOUD_PROJECT then GCLOUD_PROJECT environment variables.
Suppress error messages? Default: TRUE
Additional arguments passed to gd_initialize()
gd_initialize(): try-error (invisibly) on error.
gd_is_initialized(): logical. TRUE if initialized successfully.
Authentication is handled automatically by Google Application Default Credentials (ADC). When credentials is NULL (the default), the underlying Python libraries will automatically search for credentials in the following order:
GOOGLE_APPLICATION_CREDENTIALS environment variable (if set)
User credentials from gcloud auth application-default login
Attached service account (when running on Google Cloud infrastructure)
In a headless environment (e.g. CI/CD), use GOOGLE_APPLICATION_CREDENTIALS to specify the service account key file path and GOOGLE_CLOUD_QUOTA_PROJECT to specify the project ID responsible for quota and billing.
The deprecated private_key_file parameter is provided for backward compatibility. If specified and GOOGLE_APPLICATION_CREDENTIALS is not already set, the file path will be used to set that environment variable for the Python libraries to discover.
if (FALSE) { # \dontrun{
gd_initialize()
} # }
gd_is_initialized()
#> [1] TRUE