Skip to content

R package with helper tools in creating or handling GeoPackage files

License

Notifications You must be signed in to change notification settings

r-spatial/rgeopackage

Repository files navigation

rgeopackage

CRAN status License: GPL v3 Lifecycle: experimental Codecov test coverage

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.

Installation

You can install the development version of rgeopackage from GitHub with:

# install.packages("devtools")
remotes::install_github("r-spatial/rgeopackage")

Overview

Updating file timestamps

  • preset_timestamp(): presets the file timestamp for usage by GDAL by setting the environment variable OGR_CURRENT_DATE. The timestamp is adopted by GDAL during the entire session, unless unset_timestamp() is called.
  • amend_timestamp(): overwrites timestamps in the gpkg_contents and gpkg_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.

Related R packages

  • The sf package allows users to set GDAL configuration options in sf::st_write() using the config_options argument (see sf issue #1618) and in sf::st_read() using the options 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.

About

R package with helper tools in creating or handling GeoPackage files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages