gd_export {rgeedim} | R Documentation |
Export image to Earth Engine Asset, Google Cloud Storage Bucket, or Google Drive
Description
Exports an encapsulated image to the destination specified by type
, folder
and filename
Usage
gd_export(
x,
filename,
type = "drive",
folder = dirname(filename),
region,
wait = TRUE,
...
)
Arguments
x |
An object that inherits from |
filename |
Output filename. If |
type |
Export type. Defaults to |
folder |
Destination folder. Defaults to |
region |
Region e.g. from |
wait |
Wait for completion? Default: |
... |
Additional arguments to |
Details
See the geedim.mask.MaskedImage.export() documentation for details on additional arguments. Requires 'geedim' >1.6.0.
Value
an ee.batch.Task
object
Examples
## Not run:
if (gd_is_initialized()) {
r <- gd_bbox(
xmin = -120.6032,
xmax = -120.5377,
ymin = 38.0807,
ymax = 38.1043
)
i <- gd_image_from_id('CSP/ERGo/1_0/US/CHILI')
## export to Google Drive (default `type="drive"`)
# res <- gd_export(i, filename = "RGEEDIM_TEST.tif", scale = 100, region = r)
## export to `type="asset"`, then download by ID (stored in project assets)
# res <- gd_export(
# i,
# "RGEEDIM_TEST",
# type = "asset",
# folder = "your-project-name",
# scale = 100,
# region = r
# )
# gd_download("projects/your-project-name/assets/RGEEDIM_TEST", filename = "test.tif")
## export to Google Cloud Bucket with `type="cloud"`,
## where `folder` is the bucket path without `"gs://"`
# res <- gd_export(i, filename = "RGEEDIM_TEST.tif", type = "cloud",
# folder = "your-bucket-name", scale = 100, region = r)
}
## End(Not run)
[Package rgeedim version 0.2.7 Index]