diff --git a/R/rotate.R b/R/rotate.R index 8d5ee16c..6be279a0 100644 --- a/R/rotate.R +++ b/R/rotate.R @@ -83,12 +83,14 @@ st_rotate.stars = function(.x, lon0, lat0, north = TRUE, ...) { } } +#' @name st_rotate #' @export st_rotate.sfc = function(.x, lon0, lat0, north = TRUE, ...) { r = rapply(.x, rotate, how = "replace", lon0 = lon0, lat0 = lat0, north = north) st_set_crs(r, NA_crs_) } +#' @name st_rotate #' @export st_rotate.sf = function(.x, lon0, lat0, north = TRUE, ...) { st_set_geometry(.x, st_rotate(st_geometry(.x), lon0, lat0, north)) diff --git a/man/st_rotate.Rd b/man/st_rotate.Rd index e94429e4..66222f6e 100644 --- a/man/st_rotate.Rd +++ b/man/st_rotate.Rd @@ -3,9 +3,15 @@ \name{st_rotate} \alias{st_rotate} \alias{st_rotate.stars} +\alias{st_rotate.sfc} +\alias{st_rotate.sf} \title{Transform rotated pole long/lat regular grid to unrotated curvilinear grid} \usage{ \method{st_rotate}{stars}(.x, lon0, lat0, north = TRUE, ...) + +\method{st_rotate}{sfc}(.x, lon0, lat0, north = TRUE, ...) + +\method{st_rotate}{sf}(.x, lon0, lat0, north = TRUE, ...) } \arguments{ \item{.x}{object of class \code{stars}}