REST.SoilGrids-class {GSIF} | R Documentation |
A class for SoilGrids REST API Service. Can be used to overlay points or fetch grid values from SoilGrids Soil Information System.
server
:object of class "character"
; contains the location of the server that executes REST.SoilGrids calls
query
:object of class "list"
; contains parameters or REST.SoilGrids query
stream
:object of class "character"
; contains parameters or REST.SoilGrids stream operation
signature(x = "REST.SoilGrids", y = "SpatialPoints")
: overlays spatial points and the target grids defined via the REST.SoilGrids-class (point-by-point) and returns list of objects of "SpatialPixelsDataFrame"
-class
More examples of overlay and download functions are available via http://rest.soilgrids.org/. over
method is not recommended for large point data sets.
Tomislav Hengl & Jorge S. Mendes de Jesus
SoilGrids — a system for automated soil mapping (https://soilgrids.org)
REST API SoilGrids (http://rest.soilgrids.org)
## Not run: library(rjson) library(sp) ## 2 points: pnts <- data.frame(lon=c(10.65,5.36), lat=c(51.81,51.48), id=c("p1","p2")) coordinates(pnts) <- ~lon+lat proj4string(pnts) <- CRS("+proj=longlat +datum=WGS84") pnts ## REST example: soilgrids.r <- REST.SoilGrids(c("ORCDRC","PHIHOX")) ov <- over(soilgrids.r, pnts) str(ov) ## End(Not run)