Get SLGA modelled soil data at a point location.

get_soils_point(
  product = NULL,
  attribute = NULL,
  component = "ALL",
  depth = NULL,
  poi = NULL,
  buff = 0L,
  buff_shp = c("square", "circle"),
  stat = "median"
)

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 confidence interval surfaces.

Defaults to 'ALL'.

depth

Integer, a number 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.

poi

WGS84 coordinates defining a point of interest. Supply an sf-style point object (length-1 sfg or sfc, or single-row sf data frame) or a length-2 numeric vector (x, y).

buff

Length-1 integer. Use if a summarised value around a point is desired. Defaults to 0L, which returns the exact value(s) of the pixel under the `poi`. A `buff` value of 1 will return a summary of the pixels in a one-cell range, etc.

buff_shp

One of 'square' or 'circle'. Use with buff > 0. Defaults to 'square', in which case all values within the buffer are summarised. A circular mask is applied to the data before summarising otherwise.

stat

Summary method applied where buff > 0. Defaults to median. Other options include mean, modal, min, max, sd, IQR, quantile, and summary.

Value

An data.frame with requested values.

Note

If you have many points within a relatively small area, it will likely be more efficient to grab a raster covering the whole area and extract summary values yourself.

Examples

# \donttest{ # get predicted clay value for 60-100cm at a point clay_pt <- get_soils_point('NAT', 'CLY', 'VAL', 5, c(153,-27.5)) # get the average predicted clay content for 60-100cm within ~300m avg_clay <- get_soils_point('NAT', 'CLY', 'ALL', 5, c(153, -27.5), buff = 3, buff_shp = 'circle', stat = 'mean') # }