Learn R Programming

apsimx (version 2.2)

get_ssurgo_soil_profile: Retrieve soil profile data and convert it to an object of class ‘soil_profile’

Description

Generate a synthetic soil profile based on the information in SSURGO database

Usage

get_ssurgo_soil_profile(
  lonlat,
  shift = -1,
  nmapunit = 1,
  nsoil = 1,
  xout = NULL,
  soil.bottom = 200,
  method = c("constant", "linear"),
  nlayers = 10,
  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)

nmapunit

number of mapunits to select (see ssurgo2sp)

nsoil

number of soils to select (see ssurgo2sp)

xout
soil.bottom
method

interpolation method see ssurgo2sp

nlayers

number for layer for the new soil profile

verbose

default FALSE. Whether to print messages.

Value

this function will always return a list. Each element of the list will be an object of class ‘soil_profile’

Details

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

Examples

Run this code
# NOT RUN {
require(soilDB)
require(sp)
require(sf)
require(spData)
## Soil inforation for a single point
sp <- get_ssurgo_soil_profile(lonlat = c(-93, 42))
plot(sp[[1]])
plot(sp[[1]], property = "water")
# }
# NOT RUN {

# }

Run the code above in your browser using DataLab