Monday 23 July 2018

data - Can I download the entire NRCS SSURGO database?


I am interested in downloading and using the entire USGS SSURGO database.


The California Soil Resource Lab provides instructions on working with these data in R, but it starts with the assumption that I have downloaded tables as .csv files - but doesn't say how to get these files, other than that the metadata is available as an Access template


Can I download the entire SSURGO database? Is it available in formats other than csv + Access?



Answer




It is possible to import the SSURGO database into PostgreSQL, it is just not terribly easy. As answered in response to your other question, the SSURGO data can be downloaded by state. The information for some states (e.g., CA) will be too big and will need to be downloaded by county; multiple counties can be selected. Once the downloaded information is extracted from its archive, the spatial data are a collection of shapefiles and the tabular data are a collection of flat ASCII files (fields separated by '|').


The SSURGO metadata explains the relationships of tables (Data Model Diagram and Relations Report), table fields and their respective data type (Tables and Columns Report), and detailed column descriptions (Table Columns Description Report). Using this information it is possible to create the appropriate tables and import both the spatial and tabular data. I was able to import the mupolygon (polygon shapefile), mapunit, component, and coecoclass tables for the western US into PostgreSQL. SQL script for creating the above tables, bash script (rudimentary) for iterating over the downloaded data and importing into PostgreSQL, and SQL script for cleaning up the import.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...