createSSURGO {soilDB} | R Documentation |
Create a database from SSURGO Exports
Description
The following database types are tested and fully supported:
SQLite or Geopackage
DuckDB
Postgres or PostGIS
In theory any other DBI-compatible data source can be used for output. See conn
argument. If you encounter issues using specific DBI connection types, please report in the soilDB issue tracker.
Usage
createSSURGO(
filename,
exdir,
conn = DBI::dbConnect(DBI::dbDriver("SQLite"), filename, loadable.extensions = TRUE),
pattern = NULL,
include_spatial = TRUE,
overwrite = FALSE,
header = FALSE,
quiet = TRUE,
...
)
Arguments
filename |
Output file name (e.g. |
exdir |
Path containing containing input SSURGO spatial (.shp) and tabular (.txt) files, downloaded and extracted by |
conn |
A DBIConnection object. Default is a |
pattern |
Character. Optional regular expression to use to filter subdirectories of |
include_spatial |
Logical. Include spatial data layers in database? Default: |
overwrite |
Logical. Overwrite existing layers? Default |
header |
Logical. Passed to |
quiet |
Logical. Suppress messages and other output from database read/write operations? |
... |
Additional arguments passed to |
Value
Character. Vector of layer/table names in filename
.
See Also
Examples
## Not run:
downloadSSURGO("areasymbol IN ('CA067', 'CA077', 'CA632')", destdir = "SSURGO_test")
createSSURGO("test.gpkg", "SSURGO_test")
## End(Not run)