Description Slots Methods Note Author(s) References See Also Examples
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)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.