get_ssurgo_tables: Retrieve soil profile data and return a (list) with data...

View source: R/get_ssurgo_tables.R

get_ssurgo_tablesR Documentation

Retrieve soil profile data and return a (list) with data frames (tables)

Description

This function does partially what get_ssurgo_soil_profile does, but it returns a list with tables for mapunit, component, chorizon and mapunit.shp (object of class sf)

Usage

get_ssurgo_tables(lonlat, shift = -1, aoi, verbose = FALSE)

Arguments

lonlat

Longitude and latitude vector (e.g. c(-93, 42))

shift

simple mechanism for creating an area of interest by displacing the point indicated in lonlat by some amount of distance (e.g. 300 - in meters)

aoi

area of interest, if supplied the lonlat and shift arguments will be ignored. Should be of class ‘sp::SpatialPolygons’ or ‘sf’.

verbose

whether to print messages and warnings to the console default FALSE

Details

Data source is USDA-NRCS Soil Data Access. See package soilDB for more details

* If a point is requested then an object of class ‘sf’ is returned (for mapunit.shp) with the MUKEY and AREASYMBOL with GEOMETRY type: POINT.

* If a the request is for a spatial polygon, then an object of class ‘sf’ is returned with gid, mukey and area_ac with GEOMETRY type: POLYGON.

Value

a list with elements: mapunit, component, chorizon and mapunit.shp

Examples

## Not run: 
require(soilDB)
require(sp)
require(sf)
require(spData)
## retrieve data from lon -93, lat = 42
stbls <- get_ssurgo_tables(lonlat = c(-93, 42)) 

stbls2 <- get_ssurgo_tables(lonlat = c(-93, 42), shift = 200)


## End(Not run)

apsimx documentation built on Sept. 11, 2024, 5:42 p.m.