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" )
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, a number from 1 to 6. The numbers correspond to the following depth ranges:
|
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. |
An data.frame with requested values.
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.
# \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') # }