Skip to contents

A generic handler that covers all eight SLGA soil attributes. Each attribute has a fixed file-naming pattern encoded in .slga_config.

Usage

.read_tern_slga(did, dots, api_key, max_tries, initial_delay)

Arguments

did

Normalised 8-char dataset ID (unused; uniform handler signature).

dots

Named list of ... args from read_tern().

api_key

A character string containing your TERN API key. See get_key() for setup.

max_tries

Maximum number of download retries before an error is raised. Default=NULL, in which case the maximum retry number is resolved from the option nert.max_tries if that option exists. (Defaults to 3 retries if nert.max_tries has not been set.)

initial_delay

Initial retry delay in seconds. Each later delay is roughly double the one before. Default=NULL, in which case the initial delay is resolved from the option nert.initial_delay if that option exists. (Defaults to a 1 second initial delay if nert.initial_delay has not been set.)

Value

A terra::SpatRaster object for the requested SLGA attribute/depth/statistic.