Skip to contents

merge_sf(): Read all Geopackage files in a specified folder and combine them into a single sf object. It is tailored for importing downloaded GADM spatial data.

Usage

merge_sf(
  folder,
  layer = "ADM_ADM_0",
  check_layers = FALSE,
  wgs84 = TRUE,
  other_data = NULL,
  ...
)

Arguments

folder

A character string specifying the folder containing the data

layer

A character string specifying the layer to read from the Geopackage file

check_layers

A logical value specifying whether to return the sf::st_layers output for each file in the folder

wgs84

A logical value specifying whether to transform the data to WGS 84 (EPSG:4326) coördinate reference system

other_data

An optional sf object to add to the final sf object

...

Additional arguments to pass to sf::st_read()

Value

An sf object