SSURGO (Soil Survey Geographic database) provides soil information across the United States. The data is provide as Shapefiles with the mapping units. The attributes for each polygon are stored as a text files, which need to be imported into an Access database and linked with the shapefile.
An alternative for working with SSURGO data is to convert the shapefile to a raster, parse the text files and store the attributes for each mapping unit as a Raster Attribute Table (RAT).
To do this the following steps are required:
- Use gdal_rasterize to create a raster.
- Use RSGISLib to convert to a RAT.
- Add a column for each attribute using RIOS.
A Python script to perform these steps can be downloaded from https://github.com/MiXIL/SSURGO-Utilities.
An example of usage is:
python convertSSURGO2RAT.py --indir CA669 \ --colname claytotal_ \ --outformat KEA
A list of all available columns can be viewed using:
python convertSSURGO2RAT.py --printcols
To export the columns as a standard raster (using RSGISLib) pass in the ‘–raster’ flag.
SSURGO data can be downloaded from the USDA NRCS Geospatial Data Portal (http://datagateway.nrcs.usda.gov/)