dbConnect for drawings that may be read by package sf

# S4 method for SFSQLDriver
dbConnect(drv, DSN = "", readonly = TRUE, ...)

Arguments

drv

SFSQLDriver created by SFSQL()

DSN

data source name, may be a file, or folder path, database connection string, or URL

readonly

open in readonly mode (TRUE is the only option)

...

ignored

Details

The 'OGRSQL' available is documented with GDAL: https://gdal.org/user/ogr_sql_dialect.html

Examples

afile <- system.file("gpkg/nc.gpkg", package = "sf", mustWork = TRUE) db <- dbConnect(SFSQL(), afile) dbSendQuery(db, 'SELECT * FROM "nc.gpkg"')
#> Field names: AREA, PERIMETER, CNTY_, CNTY_ID, NAME, FIPS, FIPSNO, CRESS_ID, BIR74, SID74, NWBIR74, BIR79, SID79, NWBIR79, geom