View source: R/get_ssurgo_soil_profile.R
get_ssurgo_soil_profile | R Documentation |
Generate a synthetic soil profile based on the information in SSURGO database
get_ssurgo_soil_profile(
lonlat,
shift = -1,
nmapunit = 1,
nsoil = 1,
xout = NULL,
soil.bottom = 200,
method = c("constant", "linear"),
nlayers = 10,
check = TRUE,
fix = FALSE,
verbose = FALSE,
xargs = NULL
)
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 |
nsoil |
number of soils to select (see |
xout |
see |
soil.bottom |
see |
method |
interpolation method see |
nlayers |
number for layer for the new soil profile |
check |
whether to check for reasonable values using |
fix |
whether to fix compatibility between saturation and bulk density (default is FALSE). |
verbose |
default FALSE. Whether to print messages. |
xargs |
additional arguments passed to |
Data source is USDA-NRCS Soil Data Access. See package soilDB for more details
this function will always return a list. Each element of the list will be an object of class ‘soil_profile’
## Not run:
require(soilDB)
require(sp)
require(sf)
require(spData)
require(ggplot2)
## Soil inforation for a single point
sp <- get_ssurgo_soil_profile(lonlat = c(-93, 42))
## The initial attempt throws warnings, so better to use 'fix'
sp <- get_ssurgo_soil_profile(lonlat = c(-93, 42), fix = TRUE)
plot(sp[[1]])
plot(sp[[1]], property = "water")
## Add initial water
iwat <- initialwater_parms(Thickness = sp[[1]]$soil$Thickness,
InitialValues = sp[[1]]$soil$DUL * 0.8)
sp[[1]]$initialwater <- iwat
plot(sp[[1]], property = "initialwater")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.