Description Usage Arguments Value See Also Examples
Creates a task to export a FeatureCollection to an EE table asset.
This function is a wrapper around ee$batch$Export$table$toAsset(...)
.
1 2 3 4 5 6 | ee_table_to_asset(
collection,
description = "myExportTableTask",
assetId = NULL,
overwrite = FALSE
)
|
collection |
The feature collection to be exported. |
description |
Human-readable name of the task. |
assetId |
The destination asset ID. **kwargs: Holds other keyword arguments that may have been deprecated. |
overwrite |
Logical. If TRUE, the assetId will be overwritten if it exists. |
An unstarted Task that exports the table to Earth Engine Asset.
Other vector export task creator:
ee_table_to_drive()
,
ee_table_to_gcs()
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 36 37 38 39 40 41 | ## Not run:
library(rgee)
library(stars)
library(sf)
ee_users()
ee_Initialize()
# Define study area (local -> earth engine)
# Communal Reserve Amarakaeri - Peru
rlist <- list(xmin = -71.13, xmax = -70.95,ymin = -12.89, ymax = -12.73)
ROI <- c(rlist$xmin, rlist$ymin,
rlist$xmax, rlist$ymin,
rlist$xmax, rlist$ymax,
rlist$xmin, rlist$ymax,
rlist$xmin, rlist$ymin)
ee_ROI <- matrix(ROI, ncol = 2, byrow = TRUE) %>%
list() %>%
st_polygon() %>%
st_sfc() %>%
st_set_crs(4326) %>%
sf_as_ee()
amk_fc <- ee$FeatureCollection(
list(ee$Feature(ee_ROI, list(name = "Amarakaeri")))
)
assetid <- paste0(ee_get_assethome(), '/geom_Amarakaeri')
task_vector <- ee_table_to_asset(
collection = amk_fc,
overwrite = TRUE,
assetId = assetid
)
task_vector$start()
ee_monitoring(task_vector) # optional
ee_fc <- ee$FeatureCollection(assetid)
Map$centerObject(ee_fc)
Map$addLayer(ee_fc)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.