-
Added
auto_nodataargument forgpkg_write()automatic selection of a appropriate NoData value whenNoData = NULL- Default NoData values are now set using the new
gpkg_default_nodata()function whenauto_nodata = TRUEand no explicit NoData value is provided
- Default NoData values are now set using the new
-
Added
gpkg_default_nodata()to return appropriate default NoData values for supported raster datatypes, following GDAL and terra conventions. This function is documented and exported for user access
- Deprecated
destfileargument togpkg_write()and replaced withy, which now accepts geopackage or DBIConnection objects
-
Major cleanup and more consistent use of internal SQLiteConnection usage to ensure open connections don't get garbage collected
-
Added
gpkg_disconnect()convenience methods fortbl_SQLiteConnectionandsrc_SQLiteConnection -
Added
gpkg_connection()a user-level function for accessing or creating SQLiteConnections given ageopackageobject or a path to GeoPackage file
-
Added
[and[[methods for accessing/replacing tables in ageopackageobject -
Replaced
vapourfunctionality for driver detection withgdalrasterequivalents
-
Added
gpkg()alias forgeopackage() -
Added
gpkg_create_geometry_columns(),gpkg_geometry_columns()andgpkg_add_geometry_columns() -
Added
gpkg_sf()convenience method for creating an sf object from tables. Defaults to a sf tbl_df, useas_tibble=FALSEfor data.frame. -
Now using new
gpkg_create_spatial_ref_sys()function internally to ensure GeoPackages have the minimum required tables -
gpkg_collect()andgpkg_table(collect=TRUE)gain support for selecting a subset of columns of interest -
Deprecate
gpkg_create_dummy_features()function name and replace withgpkg_create_empty_features() -
Deprecate
gpkg_contents(template=)argument, provide new arguments for each data element (SRS ID and bounding box)
-
Implemented GDAL driver detection for file paths via {vapour} for #15
-
Implemented functions for creating
gpkg_spatial_ref_systable and adding or removing spatial reference system records:gpkg_create_spatial_ref_sys(),gpkg_add_spatial_ref_sys()gpkg_delete_spatial_ref_sys(),gpkg_list_srs()
-
Implemented basic
gpkg_validate()routine (will be expanded)- Checks that
gpkg_contentsandgpkg_spatial_ref_sysexist - Checks that at least one tile or vector dataset (with at least 0 rows) is in the database and
gpkg_contents
- Checks that
-
Added
gpkg_create_spatial_view()for creating spatial views, which are dynamic layers accessible as if they were typical static geometry layers (for #6). -
gpkg_write()now properly writing attributes from a data.frame source (which is not nested in a list) whentable_nameargument is -
gpkg_tables()better handling forterra::vect()failures with non-spatial table function fallback.- Found a regression in {terra} behavior that was reported and fixed, so the likelihood of error in the future is lower.
-
gpkg_write()now can handle SpatVectorProxy input by querying it. Note this will not work for data that will not fit in memory. May try to implement an ogr2ogr-like interface for this in the future (#15).
- Added
gpkg_bbox()as an application ofgpkg_ogr_query()
-
geopackage()internal connection object has been moved to an internal environment (<geopackage>$env$conrather than<geopackage>$con) -
gpkg_connect()allows for in-place modification of an existing object for the purposes of creating an internal SQLiteConnection -
Improvement to
gpkg_add_contents()andgpkg_update_contents(): more intelligent choice of data type when heterogeneous (non-attribute) data are in database but not registered. Fix for broken tests on Windows/GDAL 3.5.2.
-
Fixed bug in
gpkg_tables()when multiple attribute tables were present. -
Added
gpkg_ogr_query()(andogrargument togpkg_query()) to support querying OGR data sources using a 'terra' SpatVectorProxy back end. This allows for use of GeoPackage-specific SQL functions and the OGR/SQLite dialects: https://gdal.org/en/stable/user/sql_sqlite_dialect.html and https://gdal.org/en/stable/user/ogr_sql_dialect.html; requires latest 'terra' (1.7-33+) -
Added
gpkg_rast()(analog ofgpkg_vect()forterra::rast()) for lazy manipulation of gridded data in a GeoPackage -
Added
gpkg_create_dummy_features()which is a workaround for use ofgpkg_vect()on a GeoPackage with only attribute data. This creates innocuous entries ingpkg_geometry_columnsand an empty table to "trick" GDAL into reading arbitrary data sources. -
Added
gpkg_list_contents()andgpkg_ogr_contents(); the former returns only table names registered ingpkg_contentstable, which are optionally intersected with tables defined ingpkg_ogr_contentswhenogr=TRUE.
-
Fixed bug in
.gpkg_gdaloptions_add()that could cause addition of options with no value set -
Added
gpkg_vect(): aterra::vect()-based analog ofgpkg_table()for lazy manipulation of vector and attribute data in a GeoPackage -
gpkg_update_table()defaults towherecol=NULLwhich allows updating rows with no SQLWHEREclause specified
-
Refactoring table accessor methods (#2)
-
Renamed
lazy.frame()->gpkg_table_pragma() -
Renamed
dplyr.frame()->gpkg_table() -
gpkg_table()gainscollectargument (toggles materializing data.frame v.s. 'dbplyr' approach).collectrequires only 'RSQLite' not 'dbplyr'. -
gpkg_tables()gainspragmaargument to toggle use ofgpkg_table_pragma()overgpkg_table(). It also supportscollectargument.
-
-
gpkg_update_table()is now exported; this method is/was used internally for updating the NoData entry for existing layers viagpkg_tile_set_data_null()
-
Updated definitions of
lazy.frame()anddplyr.frame()and related docs -
Updated
gpkg_write()for raster, vector, and attribute data-
General cleanup and refactored approach for splitting input data sources between attributes, vector, and tiled grid coverage.
-
New approach still contains hard-coded logic related to the allowed object types and file data sources (that will be generalized in the future)
-
RASTER_TABLEname is now properly injected into GDAL options from named list input (when not otherwise specified)
-
-
Bug fix in
geopackage(<list>)related to appending v.s. overwriting raster data -
gpkg_update_contents(): Handlegpkgext_andsqlite_sequenceas standard GPKG table prefixes- fixes error with updating contents of GPKG with extensions loaded
-
Added {dbplyr} backend option to return
tibbleobject viageopackageobject internal SQLiteConnection -
Changed formatting of PRAGMA
table_infochild data.frame inlazy.frame()result
- Initial draft of key features, R package structure, and naming of functions