The current goal of rgeopackage
is to support reading and writing
metadata associated with GeoPackage (gpkg) files and assist in writing
reproducible GeoPackage files. More generally, it aims to provide
features not readily available in mainstream geospatial R packages, or
perhaps difficult to discover.
You can install the development version of rgeopackage
from
GitHub with:
# install.packages("devtools")
remotes::install_github("r-spatial/rgeopackage")
preset_timestamp()
: presets the file timestamp for usage by GDAL by setting the environment variableOGR_CURRENT_DATE
. The timestamp is adopted by GDAL during the entire session, unlessunset_timestamp()
is called.amend_timestamp()
: overwrites timestamps in thegpkg_contents
andgpkg_metadata_reference
tables of an existing GeoPackage file.
By default, GDAL sets timestamps corresponding to system time, so
GeoPackages change when rewriting. Both functions accept a Date
or
POSIXct
object and reformat to comply with the GeoPackage
standard.
-
The
sf
package allows users to set GDAL configuration options insf::st_write()
using theconfig_options
argument (see sf issue #1618) and insf::st_read()
using theoptions
argument (see sf issue 1157). These options only affect the specific read or write statement and do not persist during the session.sf
also includes a set of GDAL functions (e.g.sf::gdal_metadata()
) that are not intended to be called directly by the user but could be used to access and edit GeoPackage metadata. -
The
vapour
package provides access to the basic read functions available in GDAL including GeoPackage contents and extension tables.