Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reuse documentation - resolve #149 #150

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions R/tar-terra-rast.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
#' Provides a target format for [terra::SpatRaster-class] objects.
#'
#' @details
#' [terra::SpatRaster-class] objects do not contain raster data directly—they
#' contain a C++ pointer to memory where the data is stored. As a result, these
#' objects are not portable between R sessions without special handling, which
#' causes problems when including them in `targets` pipelines with
#' `tar_target()`. `tar_terra_rast()` handles this issue by writing and reading
#' the target as a geospatial file (specified by `filetype`) rather than saving
#' the `SpatRaster` object itself.
#' The terra package uses objects like [terra::SpatRaster-class],
#' [terra::SpatVector-class], and [terra::SpatRasterDataset] (SDS) objects -
#' these do not contain the data directly—they contain a C++ pointer to memory
#' where the data is stored. As a result, these objects are not portable
#' between R sessions without special handling, which causes problems when
#' including them in `targets` pipelines with [targets::tar_target()].
#' The functions, [tar_terra_rast()], [tar_terra_sds()],
#' [tar_terra_sprc()], [tar_terra_tiles()], and [tar_terra_vect()] handle this
#' issue by writing and reading the target as a geospatial file (specified by
#' `filetype`) rather than saving the relevant object (e.g., `SpatRaster`,
#' `SpatVector`, etc.), itself.
#'
#'
#' @param name Symbol, name of the target. A target name must be a valid name
Expand Down
4 changes: 4 additions & 0 deletions R/tar-terra-sprc.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#' Provides a target format for [terra::SpatRasterCollection] objects,
#' which have no restriction in the extent or other geometric parameters.
#'
#' @inherit tar_terra_rast details
#'
#' @param name Symbol, name of the target. A target name must be a valid name
#' for a symbol in R, and it must not start with a dot. See
#' [targets::tar_target()] for more information.
Expand Down Expand Up @@ -129,6 +131,8 @@ tar_terra_sprc <- function(
#' Provides a target format for [terra::SpatRasterDataset] objects,
#' which hold sub-datasets, each a `SpatRaster` that can have multiple layers.
#'
#' @inherit tar_terra_rast details
#'
#' @param name Symbol, name of the target. A target name must be a valid name
#' for a symbol in R, and it must not start with a dot. See
#' [targets::tar_target()] for more information.
Expand Down
9 changes: 1 addition & 8 deletions R/tar-terra-vect.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@
#'
#' Provides a target format for [terra::SpatVector-class] objects.
#'
#' @details
#' [terra::SpatVector-class] objects do not contain vector data directly—they
#' contain a C++ pointer to memory where the data is stored. As a result, these
#' objects are not portable between R sessions without special handling, which
#' causes problems when including them in `targets` pipelines with
#' `tar_target()`. `tar_terra_rast()` handles this issue by writing and reading
#' the target as a geospatial file (specified by `filetype`) rather than saving
#' the `SpatVector` object itself.
#' @inherit tar_terra_rast details
#'
#' @param name Symbol, name of the target. A target name must be a valid name
#' for a symbol in R, and it must not start with a dot. See
Expand Down
18 changes: 11 additions & 7 deletions man/tar_terra_rast.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions man/tar_terra_sds.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions man/tar_terra_sprc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 11 additions & 7 deletions man/tar_terra_vect.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading