read_sf_zip: Read shapefile(s) inside a ZIP archive via GDAL /vsizip/

View source: R/read_geo.R

read_sf_zipR Documentation

Read shapefile(s) inside a ZIP archive via GDAL ⁠/vsizip/⁠

Description

Uses zip::zip_list() to find .shp members, then reads each with sf::read_sf() on a ⁠/vsizip/...⁠ path. Multiple shapefiles become one row each (list-column data), so differing CRS are not merged.

Usage

read_sf_zip(path, quiet = TRUE, ...)

Arguments

path

Path to a .zip file.

quiet

Passed to sf::read_sf().

...

Additional arguments passed to sf::read_sf().

Value

A tibble with fpath (the ⁠/vsizip/...⁠ dsn), file_type, metadata from sf::st_layers(), and data (list-column of sf). See read_gdb().

Examples


z <- system.file("extdata", "misc_example.zip", package = "misc")
if (nzchar(z) && file.exists(z)) read_sf_zip(z)


misc documentation built on April 8, 2026, 9:10 a.m.