Description Usage Arguments Value Examples
Move a GeoTIFF image from GCS to their EE assets
1 2 3 4 5 6 | gcs_to_ee_image(
manifest,
overwrite = FALSE,
command_line_tool_path = NULL,
quiet = FALSE
)
|
manifest |
Character. manifest upload file. See |
overwrite |
Logical. If TRUE, the assetId will be overwritten if it exists. |
command_line_tool_path |
Character. Path to the Earth Engine command line
tool (CLT). If NULL, rgee assumes that CLT is set in the system PATH.
(ignore if |
quiet |
Logical. Suppress info message. |
Character. The Earth Engine asset ID.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ## Not run:
library(rgee)
library(stars)
ee_Initialize("csaybar", gcs = TRUE)
# 1. Read GeoTIFF file and create a output filename
tif <- system.file("tif/L7_ETMs.tif", package = "stars")
x <- read_stars(tif)
assetId <- sprintf("%s/%s",ee_get_assethome(),'stars_l7')
# # 2. From local to gcs
# gs_uri <- local_to_gcs(
# x = tif,
# bucket = 'rgee_dev' # Insert your own bucket here!
# )
#
# # 3. Create an Image Manifest
# manifest <- ee_utils_create_manifest_image(gs_uri, assetId)
#
# # 4. From GCS to Earth Engine
# gcs_to_ee_image(
# manifest = manifest,
# overwrite = TRUE
# )
#
# # OPTIONAL: Monitoring progress
# ee_monitoring()
#
# # OPTIONAL: Display results
# ee_stars_01 <- ee$Image(assetId)
# # ee_stars_01$bandNames()$getInfo()
# Map$centerObject(ee_stars_01)
# Map$addLayer(ee_stars_01, list(min = 0, max = 255, bands = c("b3", "b2", "b1")))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.