get_soils_data: Get SLGA soils data

Description Usage Arguments Value Note Examples

View source: R/get_data.R

Description

Downloads SLGA gridded soils data in raster format from public WCS services.

Usage

1
2
3
4
5
6
7
8
9
get_soils_data(
  product = NULL,
  attribute = NULL,
  component = "ALL",
  depth = NULL,
  aoi = NULL,
  write_out = FALSE,
  filedir
)

Arguments

product

Character, one of the options from column 'Short_Name' in slga_product_info, where Type = 'Soil'.

attribute

Character, one of the options from column 'Code' in slga_attribute_info.

component

Character, one of the following:

  • 'VAL' - predicted value surface.

  • 'CLO' - lower 95% confidence interval surface.

  • 'CHI' - upper 95% confidence interval surface.

  • 'CIS' - both confidence interval surfaces.

  • 'ALL' - value and both confidence interval surfaces.

Defaults to 'ALL'.

depth

Integer from 1 to 6. The numbers correspond to the following depth ranges:

  1. 0 to 5 cm.

  2. 5 to 15 cm.

  3. 15 to 30 cm.

  4. 30 to 60 cm.

  5. 60 to 100 cm.

  6. 100 to 200 cm.

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.

Value

Raster stack or single raster, depending on the value of 'component'.

Note

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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)
})
bne_all_clay <- raster::brick(bne_all_clay)

slga documentation built on June 12, 2021, 9:07 a.m.