gpkg_query {gpkg} | R Documentation |
Query a GeoPackage for Tabular Result
Description
gpkg_ogr_query()
: an alias for gpkg_query(..., ogr=TRUE)
Usage
gpkg_query(x, query, ogr = FALSE, ...)
gpkg_ogr_query(x, query, ...)
Arguments
x |
A geopackage object |
query |
character. An SQLite/Spatialite/GeoPackage query. The |
ogr |
logical. Use the OGR query interface (via |
... |
Additional arguments to |
Details
The GeoPackage driver supports OGR attribute filters. Provide filters in the SQLite dialect, as they will be executed directly against the database. If Spatialite is used, a recent version (4.2.0) is needed and cast operators are required to transform GeoPackage geometries to Spatialite geometries. A variety of SQL functions are available, see: https://gdal.org/drivers/vector/gpkg.html#sql-functions
Value
a data.frame result of RSQLite::dbGetQuery()
or SpatVector result from terra::query()
.