Dear
Luís Moreira de Sousa and jorge,
I am trying again using rest api (
https://rest.soilgrids.org/query?lon=111.099692&lat=-8.195569&attributes=PHIHOX), but seems different this year. (can be seen in attachment). I am trying to access and gain the PHIHOX and other layers too so there is alternative using from this website :
{"type":"Feature","geometry":{"type":"Point","coordinates":[111.099692,-8.195569]},"properties":{"layers":[{"name":"bdod","unit_measure":{"d_factor":100,"mapped_units":"cg/cm³","target_units":"kg/dm³","uncertainty_unit":""},"depths":[{"range":{"top_depth":0,"bottom_depth":5,"unit_depth":"cm"},"label":"0-5cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}},{"range":{"top_depth":5,"bottom_depth":15,"unit_depth":"cm"},"label":"5-15cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}},{"range":{"top_depth":15,"bottom_depth":30,"unit_depth":"cm"},"label":"15-30cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}},{"range":{"top_depth":30,"bottom_depth":60,"unit_depth":"cm"},"label":"30-60cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}},{"range":{"top_depth":60,"bottom_depth":100,"unit_depth":"cm"},"label":"60-100cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}},{"range":{"top_depth":100,"bottom_depth":200,"unit_depth":"cm"},"label":"100-200cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}}]},{"name":"cec","unit_measure":{"d_factor":10,"mapped_units":"mmol(c)/kg","target_units":"cmol(c)/kg","uncertainty_unit":""},"depths":[{"range":{"top_depth":0,"bottom_depth":5,"unit_depth":"cm"},"label":"0-5cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}},{"range":{"top_depth":5,"bottom_depth":15,"unit_depth":"cm"},"label":"5-15cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}},{"range":{"top_depth":15,"bottom_depth":30,"unit_depth":"cm"},"label":"15-30cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}},{"range":{"top_depth":30,"bottom_depth":60,"unit_depth":"cm"},"label":"30-60cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}},{"range":{"top_depth":60,"bottom_depth":100,"unit_depth":"cm"},"label":"60-100cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}},{"range":{"top_depth":100,"bottom_depth":200,"unit_depth":"cm"},"label":"100-200cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}}]},{"name":"cfvo","unit_measure":{"d_factor":10,"mapped_units":"cm³/dm³","target_units":"cm³/100cm³","uncertainty_unit":""},"depths":[{"range":{"top_depth":0,"bottom_depth":5,"unit_depth":"cm"},"label":"0-5cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}},{"range":{"top_depth":5,"bottom_depth":15,"unit_depth":"cm"},"label":"5-15cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}},{"range":{"top_depth":15,"bottom_depth":30,"unit_depth":"cm"},"label":"15-30cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}},{"range":{"top_depth":30,"bottom_depth":60,"unit_depth":"cm"},"label":"30-60cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}},{"range":{"top_depth":60,"bottom_depth":100,"unit_depth":"cm"},"label":"60-100cm","values":{"Q0.05":null,"Q0.5":null,"Q0.95":null,"mean":null,"uncertainty":null}},{"range":{"top_depth":100,"bottom_depth":200,"unit_depth":"cm"},"label":"100-200cm","values":
and I cant use using R language :
## 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)
from this I have some difficulties accesing and an error from the executing this command : soilgrids.r <- REST.SoilGrids(c("ORCDRC","PHIHOX"))
Error in REST.SoilGrids(c("ORCDRC", "PHIHOX")) :
could not find function "REST.SoilGrids"
Any solution for this problem? Thank you very much.