From fd5b59d643d5fa8475cf6740dd5046eca6b2bbb7 Mon Sep 17 00:00:00 2001 From: Andrew Gene Brown Date: Wed, 20 Dec 2023 14:55:06 -0800 Subject: [PATCH] docs [skip ci] --- R/fetchSoilGrids.R | 12 ++++++++---- man/fetchSoilGrids.Rd | 9 +++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/R/fetchSoilGrids.R b/R/fetchSoilGrids.R index f1adb705..7aca4d5d 100644 --- a/R/fetchSoilGrids.R +++ b/R/fetchSoilGrids.R @@ -1,6 +1,10 @@ -#' Get SoilGrids Estimates for Points or Spatial Extent +#' Get SoilGrids Properties Estimates for Points or Spatial Extent #' -#' This function obtains SoilGrids properties information (250m raster resolution) given a \code{data.frame} containing site IDs, latitudes and longitudes. SoilGrids API and maps return values as whole (integer) numbers to minimize the storage space used. These values are converted by to produce conventional units by `fetchSoilGrids()`` +#' This function obtains SoilGrids properties information (250m raster resolution) given a \code{data.frame} containing site IDs, latitudes and longitudes, or a spatial extent. +#' +#' SoilGrids API and maps return values as whole (integer) numbers to minimize the storage space used. These values are converted by to produce conventional units by `fetchSoilGrids()`` +#' +#' @details #' #' ## Properties #' @@ -33,11 +37,11 @@ #' @references Poggio, L., de Sousa, L. M., Batjes, N. H., Heuvelink, G. B. M., Kempen, B., Ribeiro, E., and Rossiter, D.: SoilGrids 2.0: producing soil information for the globe with quantified spatial uncertainty, SOIL, 7, 217-240, 2021. \doi{https://doi.org/10.5194/soil-7-217-2021} #' @importFrom utils packageVersion #' -#' @param x A `data.frame` containing 3 columns referring to site ID, latitude and longitude. +#' @param x A `data.frame` containing 3 columns referring to site ID, latitude and longitude. Or a spatial (sf, terra) object for which a bounding box can be calculated when `grid=TRUE`. #' @param loc.names Optional: Column names referring to site ID, latitude and longitude. Default: `c("id", "lat", "lon")` #' @param depth_intervals Default: `"0-5"`, `"5-15"`, `"15-30"`, `"30-60"`, `"60-100"`, `"100-200"` #' @param variables Default: `"bdod"`, `"cec"`, `"cfvo"`, `"clay"`, `"nitrogen"`, `"phh2o"`, `"sand"`, `"silt"`, `"soc"`, `"ocd"`. Optionally `"ocs"` for 0 to 30 cm interval. -#' @param grid Download subset of SoilGrids Cloud Optimized GeoTIFF? Default: FALSE +#' @param grid Download subset of SoilGrids Cloud Optimized GeoTIFF? Default: `FALSE` #' @param filename Only used when `grid=TRUE`. If `NULL` defaults to an in-memory raster, or temporary file if result does not fit in memory. #' @param overwrite Only used when `grid=TRUE`. Default: `FALSE` #' @param target_resolution Only used when `grid=TRUE`. Default: `c(250, 250)` (250m x 250m pixels) diff --git a/man/fetchSoilGrids.Rd b/man/fetchSoilGrids.Rd index 95926af5..27dd9377 100644 --- a/man/fetchSoilGrids.Rd +++ b/man/fetchSoilGrids.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/fetchSoilGrids.R \name{fetchSoilGrids} \alias{fetchSoilGrids} -\title{Get SoilGrids Estimates for Points or Spatial Extent} +\title{Get SoilGrids Properties Estimates for Points or Spatial Extent} \usage{ fetchSoilGrids( x, @@ -21,7 +21,7 @@ fetchSoilGrids( ) } \arguments{ -\item{x}{A \code{data.frame} containing 3 columns referring to site ID, latitude and longitude.} +\item{x}{A \code{data.frame} containing 3 columns referring to site ID, latitude and longitude. Or a spatial (sf, terra) object for which a bounding box can be calculated when \code{grid=TRUE}.} \item{loc.names}{Optional: Column names referring to site ID, latitude and longitude. Default: \code{c("id", "lat", "lon")}} @@ -29,7 +29,7 @@ fetchSoilGrids( \item{variables}{Default: \code{"bdod"}, \code{"cec"}, \code{"cfvo"}, \code{"clay"}, \code{"nitrogen"}, \code{"phh2o"}, \code{"sand"}, \code{"silt"}, \code{"soc"}, \code{"ocd"}. Optionally \code{"ocs"} for 0 to 30 cm interval.} -\item{grid}{Download subset of SoilGrids Cloud Optimized GeoTIFF? Default: FALSE} +\item{grid}{Download subset of SoilGrids Cloud Optimized GeoTIFF? Default: \code{FALSE}} \item{filename}{Only used when \code{grid=TRUE}. If \code{NULL} defaults to an in-memory raster, or temporary file if result does not fit in memory.} @@ -50,9 +50,10 @@ corresponding to 5th, 50th and 95th percentiles and mean value for selected \cod A SoilProfileCollection or SpatRaster when \code{grid=TRUE} } \description{ -This function obtains SoilGrids properties information (250m raster resolution) given a \code{data.frame} containing site IDs, latitudes and longitudes. SoilGrids API and maps return values as whole (integer) numbers to minimize the storage space used. These values are converted by to produce conventional units by `fetchSoilGrids()`` +This function obtains SoilGrids properties information (250m raster resolution) given a \code{data.frame} containing site IDs, latitudes and longitudes, or a spatial extent. } \details{ +SoilGrids API and maps return values as whole (integer) numbers to minimize the storage space used. These values are converted by to produce conventional units by `fetchSoilGrids()`` \subsection{Properties}{\tabular{lllrl}{ Name \tab Description \tab Mapped units \tab Conversion factor \tab Conventional units \cr bdod \tab Bulk density of the fine earth fraction \tab cg/cm^3 \tab 100 \tab kg/dm^3 \cr