Downloads SLGA gridded soils data in raster format from public WCS services.
get_soils_data( product = NULL, attribute = NULL, component = "ALL", depth = NULL, aoi = NULL, write_out = FALSE, filedir )
product | Character, one of the options from column 'Short_Name' in
|
---|---|
attribute | Character, one of the options from column 'Code' in
|
component | Character, one of the following:
Defaults to 'ALL'. |
depth | Integer from 1 to 6. The numbers correspond to the following depth ranges:
|
aoi | Vector of WGS84 coordinates defining a rectangular area of interest. The vector may be specified directly in the order xmin, ymin, xmax, ymax, or the function can derive an aoi from the boundary of an `sf` or `raster` object. |
write_out | Boolean, whether to write the retrieved dataset to disk. Defaults to FALSE. |
filedir | directory in which to write files if write_out == TRUE. |
Raster stack or single raster, depending on the value of `component`.
An aoi larger than 1x1 decimal degree is retrieveable, but be aware that download file size will be large. If you want a dataset that covers more than ~3x3', it may be faster to download the full GeoTIFF from the CSIRO Data Access Portal and crop out your AOI using GDAL.
Output rasters are aligned to the parent dataset rather than the aoi. Further resampling may be required for some applications.
specify `depth = 1` for attributes 'DES' and 'DER' as they are whole-of-profile parameters.
# \donttest{ # get surface clay data for central Brisbane aoi <- c(152.95, -27.55, 153.07, -27.45) bne_surface_clay <- get_soils_data(product = 'NAT', attribute = 'CLY', component = 'ALL', depth = 1, aoi = aoi, write_out = FALSE) # get estimated clay by depth for central Brisbane bne_all_clay <- lapply(seq.int(6), function(d) { get_soils_data(product = 'NAT', attribute = 'CLY', component = 'VAL', depth = d, aoi = aoi, write_out = FALSE) })#>#>#>#>#>#>