Skip to contents

[Superseded]

rfp_u_rm_gpkg_layers() has been superseded in favour of gdalraster::ogr_layer_delete()

This function removes specified layers from a GeoPackage by listing all layers using sf::st_layers, then recreating the GeoPackage without the specified layers using ogr2ogr commands executed via system2.

Usage

rfp_u_rm_gpkg_layers(path_gpkg, layers_remove)

Arguments

path_gpkg

A string specifying the path to the GeoPackage file.

layers_remove

A character vector naming the layers to be removed from the GeoPackage.

Value

Invisible NULL, indicating the function is used for its side effects.

Examples

if (FALSE) { # \dontrun{
  path_gpkg <- "path/to/your.gpkg"
  layers_remove <- c("layer_to_remove1", "layer_to_remove2")
  rfp_u_rm_gpkg_layers(path_gpkg, layers_remove)
} # }