techmatters / soil-id-algorithm

GNU Affero General Public License v3.0
1 stars 0 forks source link

Soil ID Algorithm

explanation of algorithm

terminology

references

dependencies

algorithm

Input: a specific point in lat/lon, and a set of depth intervals.

  1. Query for all map units within 1km of the point.
  2. Fall back to STATSGO at 10km if SSURGO is incomplete, or else declare not available if area not surveyed.
  3. Associate each map unit with its polygons' minimum distance to the point in question.
  4. Infill missing components by rescaling them to sum to 100.
  5. Calculate the component probabilities by, for each component, dividing the distance-weighted sum of that component's probability in each map unit by the total distance-weighted sum of each component's probability in each map unit.
  6. Limit to components in the top 12 component series by probability.
  7. Query the local database for the component horizons.
  8. Return the individual probabilities of data at each horizon based on the weighted sum of each component's data at each horizon.

Resources

SoilID Project Box Folder

• This folder contains the data schema and processed soil database tables that are ingested into the mySQL database.

https://nrcs.app.box.com/s/vs999nq9ruyetb9b4l7okmssdggh8okn

SSURGO/STATSGO2 metadata:

https://www.nrcs.usda.gov/resources/data-and-reports/ssurgo/stats2go-metadata

SSURGO/STATSGO data:

https://nrcs.app.box.com/v/soils/folder/17971946225

Testing

Regular tests

There is a small suite of integration tests which can be run with the make test command, and gets run regularly by CI.

Bulk test

There is a large suite of integration tests which takes many hours to run. It comes in the format of two scripts:

Acknowledgements