ISRICWISE_extract_SUIDs: A wrapper for 'reaggregate_raster' designed to work with the...

Description Usage Arguments Value See Also

View source: R/ExtractData_Soils.R

Description

A wrapper for reaggregate_raster designed to work with the rasters of the ‘ISRIC-WISE’ datasets versions 5-arcmin v1.2 and 30-arcsec v1.0

Usage

1
ISRICWISE_extract_SUIDs(i, res = c(0, 0), grid, sp_sites, att = NULL)

Arguments

i

An integer value. The index to select a location from among sp_sites and the corresponding resolution res.

res

A numeric vector of length two or a matrix with two columns. The x- and y-extent of the rectangle(s) for which to extract values.

grid

A raster::RasterLayer object with one layer. The raster from which values are extracted.

sp_sites

A sp::SpatialPoints object. This object is used to extract the coordinates of the i-th location.

att

A character string. Which variable in the RAT table should be returned. If NULL then extracted values of grid are returned.

Value

A list with four elements

i

An integer value. The location index.

SUIDs_N

An integer vector. The number of unique values within the rectangle of x.

SUID

A numeric vector or a vector of character strings. The unique soil soil identifier values or NA.

fraction

A numeric vector. The relative areas covered by SUID.

See Also

reaggregate_raster


Burke-Lauenroth-Lab/SoilWat_R_Wrapper documentation built on Aug. 14, 2020, 5:17 p.m.