Learn R Programming

soilDB (version 2.6.15)

mukey.wcs: Get gNATSGO / gSSURGO Map Unit Key (mukey) grid from SoilWeb Web Coverage Service (WCS)

Description

Download chunks of the gNATSGO or gSSURGO map unit key grid via bounding-box from the SoilWeb WCS.

Usage

mukey.wcs(aoi, db = c("gnatsgo", "gssurgo"), res = 30, quiet = FALSE)

Arguments

aoi

area of interest (AOI) defined using either a Spatial*, RasterLayer, sf, sfc or bbox object, or a list, see details

db

name of the gridded map unit key grid to access, should be either 'gnatsgo' or 'gssurgo'

res

grid resolution, units of meters. The native resolution of gNATSGO and gSSURGO (this WCS) is 30m.

quiet

logical, passed to download.file to enable / suppress URL and progress bar for download.

Value

raster object containing indexed map unit keys and associated raster attribute table or a try-error if request fails

Details

aoi should be specified as one of: Spatial*, RasterLayer, sf, sfc, bbox object, or a list containing:

aoi

bounding-box specified as (xmin, ymin, xmax, ymax) e.g. c(-114.16, 47.65, -114.08, 47.68)

crs

coordinate reference system of BBOX, e.g. '+init=epsg:4326'

The WCS query is parameterized using raster::extent derived from the above AOI specification, after conversion to the native CRS (EPSG:5070) of the gNATSGO / gSSURGO grid.

Databases available from this WCS can be queried using WCS_details(wcs = 'mukey').