Description Usage Arguments Value Examples
Move a zipped shapefile from GCS to their EE Assets
1 2 3 4 5 6 | gcs_to_ee_table(
manifest,
command_line_tool_path = NULL,
overwrite = FALSE,
quiet = FALSE
)
|
manifest |
Character. manifest upload file. See |
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 |
overwrite |
Logical. If TRUE, the assetId will be overwritten if it exists. |
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 | ## Not run:
library(rgee)
library(sf)
ee_Initialize(gcs = TRUE)
# 1. Read dataset and create a output filename
x <- st_read(system.file("shape/nc.shp", package = "sf"))
assetId <- sprintf("%s/%s", ee_get_assethome(), 'toy_poly_gcs')
# 2. From sf to .shp
shp_dir <- sprintf("%s.shp", tempfile())
geozip_dir <- ee_utils_shp_to_zip(x, shp_dir)
# 3. From local to gcs
gcs_filename <- local_to_gcs(
x = geozip_dir,
bucket = "rgee_dev" # Insert your own bucket here!
)
# 4. Create Table Manifest
manifest <- ee_utils_create_manifest_table(
gs_uri = gcs_filename,
assetId = assetId
)
# 5. From GCS to Earth Engine
ee_nc <- gcs_to_ee_table(manifest, overwrite = TRUE)
ee_monitoring()
Map$addLayer(ee$FeatureCollection(ee_nc))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.