soilgridsParams.Rd
soilgridsParams
takes a vector of depths and returns a list of soil characteristics ready to use with soil
function.
soilgridsParams(x, widths = c(300, 700, 1000, 2000), verbose = FALSE)
An object of class (or subclass) sf
or sfc
with a valid CRS definition.
A numeric vector indicating the desired layer widths, in mm. If NULL
the default soil grids layer definition is returned.
A logical flag to include a progress bar while processing the output of the query to the SoilGrids REST API.
If only one point is supplied, a data frame containing the soil characteristics ready to use with the
soil
function. If more than one point is supplied, the function returns a list with as many elements
as points, each one containing the mentioned list.
This function connects with the SoilGrids REST API (https://rest.isric.org) to retrieve the soil physical and chemical characteristics for a site (Hengl et al. 2007), selected by its coordinates. Also, in case the depths are not the default ones in the SoilGrids API, the function uses averages the values of soil grid layers depending on the overlap between soil layer definitions. Input coordinates are transformed to longitude/latitude within the function.
Hengl T, Mendes de Jesus J, Heuvelink GBM, Ruiperez Gonzalez M, Kilibarda M, Blagotić A, et al. (2017) SoilGrids250m: Global gridded soil information based on machine learning. PLoS ONE 12(2): e0169748. doi:10.1371/journal.pone.0169748.