R/translate.R

Defines functions wk_translate.default wk_translate

Documented in wk_translate wk_translate.default

#' Translate geometry vectors
#'
#' @inheritParams wk_handle
#' @param to A prototype object.
#'
#' @export
#'
wk_translate <- function(handleable, to, ...) {
  UseMethod("wk_translate", to)
}

#' @rdname wk_translate
#' @export
wk_translate.default <- function(handleable, to, ...) {
  result <- wk_handle(handleable, wk_writer(to), ...)
  attr(result, "crs") <- wk_crs_output(handleable, to)
  wk_set_geodesic(result, wk_is_geodesic_output(handleable, to))
}

Try the wk package in your browser

Any scripts or data that you put into this service are public.

wk documentation built on Oct. 12, 2024, 1:07 a.m.