gpkg-contents: Add, Remove, Update and Create 'gpkg_contents' table and...

gpkg_add_contentsR Documentation

Add, Remove, Update and Create gpkg_contents table and records

Description

gpkg_add_contents(): Add a record to gpkg_contents

gpkg_update_contents(): Add and remove gpkg_contents records to match existing tables

gpkg_delete_contents(): Delete a record from gpkg_contents based on table name

gpkg_create_contents(): Create an empty gpkg_contents table

Usage

gpkg_add_contents(
  x,
  table_name,
  data_type = NULL,
  description = "",
  srs_id = NULL,
  ext = NULL,
  template = NULL,
  query_string = FALSE
)

gpkg_update_contents(x)

gpkg_delete_contents(x, table_name, query_string = FALSE)

gpkg_create_contents(x, query_string = FALSE)

Arguments

x

A geopackage

table_name

Name of table to add or remove record for in gpkg_contents

data_type

character. One of: ⁠2d-gridded-coverage⁠, "features", "attributes". Default NULL will attempt to auto-detect table type based on gpkg_table_pragma() information; falls back to "attributes" if raster or vector data are not detected.

description

Default: ""

srs_id

integer. Spatial Reference System ID. Must be defined in gpkg_spatial_ref_sys table.

ext

numeric. A numeric vector of length four specifying the bounding box extent.

template

Deprecated. A list containing elements "srsid" and "ext".

query_string

logical. Return SQLite statement rather than executing it? Default: FALSE

Value

logical. TRUE on successful execution of SQL statements.


gpkg documentation built on April 3, 2025, 8:55 p.m.