Learn R Programming

GSIF (version 0.5-3)

REST.SoilGrids-class: A class for SoilGrids REST API

Description

A class for SoilGrids REST API Service. Can be used to overlay points or fetch grid values from SoilGrids Soil Information System.

Arguments

Slots

Methods

References

See Also

SoilGrids-class, WPS-class

Examples

Run this code
## 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)

Run the code above in your browser using DataLab