build_pt_asset: build pt asset

Description Usage Arguments Examples

View source: R/build_ee_asset.R

Description

Build an Earth Engine asset from a data.table of locs.

Usage

1
2
build_pt_asset(DT, out, projection, id = "id", coords = c("X", "Y"),
  extra = NULL, overwrite = FALSE)

Arguments

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 overwrite_layer in writeOGR

Examples

 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)

robitalec/toast documentation built on May 17, 2019, 3:14 a.m.