fetch_mukeys_spatially_NRCS_SDA: Spatially query mukey values for point locations from NRCS...

View source: R/extract_soils_NRCS_SDA.R

fetch_mukeys_spatially_NRCS_SDAR Documentation

Spatially query mukey values for point locations from NRCS web-based SDA service

Description

Spatially query mukey values for point locations from NRCS web-based SDA service

Usage

fetch_mukeys_spatially_NRCS_SDA(
  x,
  crs = 4326,
  db = c("SSURGO", "STATSGO"),
  ...,
  chunk_size = 50L,
  progress_bar = FALSE
)

Arguments

x

A numerical two-dimensional object (a matrix, array, or data.frame) with longitude/X, latitude/Y as columns; a sp::SpatialPoints object; or a terra::SpatVector object; or a sf object with a point geometry, i.e., an object with a class sf or sfc.

crs

An object which is a crs or from which one can be derived. x can be numeric as a EPSG number; a character string as a wkt; a character string as a proj4 (not recommended because outdated); or of a class including raster::Raster, sp::Spatial, sp::CRS, or a sf or sfc class.

db

A character string. Query mukey from the SSURGO or from the STATSGO soil database.

...

Currently ignored.

chunk_size

An integer value. The size of chunks into which locations is broken up and looped over for processing.

progress_bar

A logical value. Display a progress bar as the code loops over the chunks?

Value

A named list with two elements:

  • ref The data reference.

  • mukeys A vector with a mukey value for each locations.

Examples

## Not run: 
if (curl::has_internet()) {
  locations <- matrix(
    data = c(-120.325, -111.245, 39.855, 36.753),
    nrow = 2
  )

  fetch_mukeys_spatially_NRCS_SDA(locations)
}

## End(Not run)


DrylandEcology/rSW2exter documentation built on May 4, 2024, 10:53 p.m.