3

I am trying to extract soil data from https://soilgrids.org/ using their very new Soilgrids REST API. They have a special website (http://rest.isric.org/soilgrids/v2.0/docs) where I am able to enter the coordinates and get the soil data that I require.

But for some reason, I am not able to get data for many coordinates that I tried. For example, I can get data for (lat=39.1813855,lon=-77.1827295) but not for (lat=39.1825835,lon=-77.1828465).

Why can't I get data for the last point (lat=39.1825835,lon=-77.1828465)??

3
  • Welcome to GIS SE! We're a little different from other sites; this isn't a discussion forum but a Q&A site. Please check out our short tour to learn about our focussed Q&A format. If you seek "Soilgrids technical staff [to] help [you]" then I think you should contact them for support.
    – PolyGeo
    May 7, 2020 at 6:15
  • @PolyGeo Could this question be open?? The question was edit and there is a technical answer based on the data, more users have encountered the same situation May 9, 2020 at 12:09
  • @JorgeMendes I’ve voted to re-open but I think the question should by improved by the inclusion of code that illustrates both their successful and unsuccessful attempts, and any error returned by the latter.
    – PolyGeo
    May 9, 2020 at 18:25

1 Answer 1

2

Checking the two points for soil property silt at depth of 0-5cm with the following script:

#!/usr/bin/env python3.8

import requests

p1={"lat":39.1813855,"lon":-77.1827295}
p2={"lat":39.1825835,"lon":-77.1828465}

rest_url = "https://rest.isric.org"
prop_query_url = f"{rest_url}/soilgrids/v2.0/properties/query"

props = {"property":"silt","depth":"0-5cm","value":"mean"}

res1=requests.get(prop_query_url,params={**p1 , **props})
print(res1.json()['properties']["layers"][0]["depths"][0]["values"])
#p1 --> {'mean': 462} 

res2=requests.get(prop_query_url,params={**p2 , **props})
print(res2.json()['properties']["layers"][0]["depths"][0]["values"])
#p2 --> {'mean': None}

The REST returns a valid GeoJSON with content for both cases, but the second point has null/None value instead of a numerical value.

Checking the soilgrids FAQ, there is a mask being applied on the soil estimations and no estimations have been done for urban areas. Your second point is returning null because it falls on an urban area.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.