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
Usage
createSSURGO(
filename = NULL,
exdir,
conn = NULL,
pattern = NULL,
include_spatial = TRUE,
include_tabular = TRUE,
dissolve_field = NULL,
maxruledepth = 0,
overwrite = FALSE,
header = FALSE,
quiet = TRUE,
...
)
Arguments
filename |
character. Output file name (e.g. |
exdir |
character. 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 or character. Include spatial data layers in database?
Default: |
include_tabular |
logical or character. Include tabular data layers in database?
Default: |
dissolve_field |
character. Dissolve geometries to create MULTIPOLYGON features? Column
name
specified is the grouping variable. Default: |
maxruledepth |
integer. Maximum rule depth for |
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 |
Details
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.
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)