Rational
Option OneRetrieve soil data geoTIFFs from SGLA and extract data contained within shapefile elements.
Data will be: Available Water Capacity, Coarse Fragments, Clay Percentage, Total Nitrogen Percentage, pH CaCl2, Total Phosphorus Percentage, Silt Percentage, Sand Percentage, Organic Carbon Percentage, Available Phosphorus
This is Australia specific data.
Option TwoRetrieve soil data from DPIRD-077 dataset: Dominant soil groups - Highest probability.
Available on dataWA: DPIRD077
This is W.A. specific data.
Option One
Input Files
Shapefile
.shp
.cpg
.dbf
.prj
.shx
Learn how to produce this shapefile from a CSV of sample names, latitudes and longitudes here: Site Locations to Shapefile
You will also need to get an API key from TERN to acsess the current data: SLGA Archive
Scripts Used
Environmental Data / Soil - SGLA
download_soil.py
shp_soil.py
Steps
1. Retrieving Soil Data
download_soil.py --apikey YOUR_API_KEY
Arguments
- Your TERN API key (e.g. asdgfASGEJfhd563ATYfgsYHgSDFko3456cfgs6fsy89wa!gVg)
Outputs
- geoTIFFs of specifed soil types (e.g.
Available_Water_Capacity_0-5cm.tif
)
2. Extract Soil Data from geoTIFF with shapefile elements
python shp_soil.py 'path/to/shapefile/file.shp' 'path/to/geoTIFF/folder/' ./
Arguments
- Path to your
.shp
(e.g. output_shapes.shp) - Path to your directory containig downloaded geoTIFFs (e.g. Available_Water_Capacity_0-5cm.tif)
- Output directory for CSVs
Outputs
- CSVs of mean, minimum and maxnimum soil attributes within each shapefile element.
Option Two
Input Files
Shapefile
.shp
.cpg
.dbf
.prj
.shx
Learn how to produce this shapefile from a CSV of sample names, latitudes and longitudes here: Site Locations to Shapefile
Scripts Used
Environmental Data / Soil Type - DPIRD077
dpird-077.py
Steps
1. Retrieving Soil Type Data
Download geoTIFF and lookup table (as a CSV) of DPIRD077. Rename the lookup table lookup table - lookup.csv
Available on dataWA: DPIRD077
2. Extract Soil Data from geoTIFF with shapefile elements
python dpird-077.py 'path/to/shapefile/file.shp'
Arguments
- Path to your
.shp
(e.g. output_shapes.shp)
Outputs
- CSVs of WASG name percentages for each shapefile element.