diff --git a/R/tar-terra-vect.R b/R/tar-terra-vect.R index eadc681..2379388 100644 --- a/R/tar-terra-vect.R +++ b/R/tar-terra-vect.R @@ -1,38 +1,3 @@ -# format_terra_vect_shapefile <- targets::tar_format( -# read = function(path) { -# terra::vect( -# paste0( -# "/vsizip/", -# file.path( -# path, -# replace_dot_zip_with_shp(path) -# ) -# ) -# ) -# }, -# write = function(object, path) { -# terra::writeVector( -# x = object, -# filename = replace_dot_zip_with_shp(path), -# filetype = "ESRI Shapefile", -# overwrite = TRUE -# ) -# zf <- list.files( -# pattern = replace_dot_zip( -# x = path, -# replacement = "" -# ) -# ) -# utils::zip( -# zipfile = path, -# files = zf -# ) -# unlink(zf) -# }, -# marshal = function(object) terra::wrap(object), -# unmarshal = function(object) terra::unwrap(object) -# ) - #' Targets format for terra vectors #' #' Provides targets format for `terra::vect` objects diff --git a/R/utils.R b/R/utils.R deleted file mode 100644 index 61f77ad..0000000 --- a/R/utils.R +++ /dev/null @@ -1,11 +0,0 @@ -replace_dot_zip <- function(x, replacement) { - gsub( - pattern = "\\.zip", - replacement = replacement, - x = basename(x) - ) -} - -replace_dot_zip_with_shp <- function(x) { - replace_dot_zip(x, ".shp") -}