read_kmz: Read a KMZ file (KML in a ZIP)

View source: R/read_geo.R

read_kmzR Documentation

Read a KMZ file (KML in a ZIP)

Description

Extracts the archive to a temporary directory and reads each KML layer with sf::read_sf() after sf::st_layers(). Multiple KML files or multiple layers yield one row per layer; layer_name is simplified when there is only one layer in one file.

Usage

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

Arguments

path

Path to a .kmz file.

quiet

Passed to sf::read_sf().

...

Additional arguments passed to sf::read_sf().

Value

A tibble with the same columns as read_gdb(). Here fpath is the path to the original .kmz (not the temporary .kml), and file_type is typically "kmz". Metadata columns still come from sf::st_layers() on the extracted KML file used for reading.

Examples


kmz <- system.file("extdata", "misc_example.kmz", package = "misc")
if (nzchar(kmz) && file.exists(kmz)) read_kmz(kmz)


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