Description Usage Arguments Examples
View source: R/build_ee_asset.R
Build an Earth Engine asset from a data.table of locs.
1 2 | build_pt_asset(DT, out, projection, id = "id", coords = c("X", "Y"),
extra = NULL, overwrite = FALSE)
|
DT |
data.table |
out |
pathname of output shapefile folder. Includes location of the output folder but does not matter if that folder exists. The last portion of the pathname will be used for the layer name e.g.: 'path/to/caribou' layer name = 'caribou' |
projection |
character string indicating projection |
id |
point id column name |
coords |
coordinates column name for X and Y as character vector |
extra |
columns preserved in output asset |
overwrite |
boolean passed to option |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Load data.table
library(data.table)
# Read example data
DT <- fread(system.file("extdata", "DT.csv", package = "toast"))
# Set string of project
utm21N <- '+proj=utm +zone=21 ellps=WGS84'
# Setnames to build_pt_asset defaults
data.table::setnames(DT, 'ID', 'id')
# Write out shapefile and zip for EE
# (not run)
# build_pt_asset(DT, 'data/derived-data/48hr-caribou', utm21N)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.