powered by
Create a SQLite database or GeoPackage from one or more SSURGO Exports
createSSURGO( filename, exdir, pattern = NULL, include_spatial = TRUE, overwrite = FALSE, header = FALSE, quiet = TRUE, ... )
Character. Vector of layer/table names in filename.
filename
Output file name (e.g. 'db.sqlite' or 'db.gpkg')
'db.sqlite'
'db.gpkg'
Path containing containing SSURGO spatial (.shp) and tabular (.txt) files.
Character. Optional regular expression to use to filter subdirectories of exdir. Default: NULL will search all subdirectories for SSURGO export files.
exdir
NULL
Logical. Include spatial data layers in database? Default: TRUE.
TRUE
Logical. Overwrite existing layers? Default FALSE will append to existing tables/layers.
FALSE
Logical. Passed to read.delim() for reading pipe-delimited (|) text files containing tabular data.
read.delim()
|
Logical. Suppress messages and other output from database read/write operations?
Additional arguments passed to write_sf() for writing spatial layers.
write_sf()
if (FALSE) { downloadSSURGO("areasymbol IN ('CA067', 'CA077', 'CA632')", destdir = "SSURGO_test") createSSURGO("test.gpkg", "SSURGO_test") }
Run the code above in your browser using DataLab