NRCS: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
mNo edit summary
Brian Wilson (talk | contribs)
mNo edit summary
 
Line 20: Line 20:
# Copy the tabular/mapunit.txt to mapunit.csv
# Copy the tabular/mapunit.txt to mapunit.csv
# Edit the tabular/mapunit.csv file to add a header line
# Edit the tabular/mapunit.csv file to add a header line
# Join the spatial and mapunit.csv in QGIS
# Join the spatial and mapunit.csv and copy it to a shapefile with ogr2ogr
# Save the joined data to a shapefile
# Import the shapefile into the project
# Import the shapefile into the project
ogr2ogr -sql "select inshape.*, joincsv.soiltype, joincsv.hvf from inshape left join 'mapunit.csv'.joincsv on inshape.MUKEY = joincsv.mukey" \
    outshape.shp \
    inshape.shp inshape

Latest revision as of 02:06, 3 February 2017

USDA Natural Resource Conservation Service

Soil data

You can download data from their Web Soil Survey page, at https://websoilsurvey.sc.egov.usda.gov/App/HomePage.htm and then (in theory) view it in their desktop app (if you have MS Access) or using their ArcGIS extension.

  • So far I cannot view the data in their data viewer.
  • It's because the database is empty.
  • To populate the database requires a copy of MS Access, which I don't have.
  • So their viewer and extension are useless to me.

Workflow

  1. Go to WSS
  2. Select a county
  3. Download the data
  4. Unzip it
  5. Copy the tabular/mapunit.txt to mapunit.csv
  6. Edit the tabular/mapunit.csv file to add a header line
  7. Join the spatial and mapunit.csv and copy it to a shapefile with ogr2ogr
  8. Import the shapefile into the project


ogr2ogr -sql "select inshape.*, joincsv.soiltype, joincsv.hvf from inshape left join 'mapunit.csv'.joincsv on inshape.MUKEY = joincsv.mukey" \
   outshape.shp \
   inshape.shp inshape