tiff_metadata: Read GDAL_METADATA from a GeoTIFF

View source: R/tbl.R

tiff_metadataR Documentation

Read GDAL_METADATA from a GeoTIFF

Description

Returns the GDAL_METADATA XML string (TIFF tag 42112) embedded in a GeoTIFF file. Returns NA if the tag is not present.

Usage

tiff_metadata(path)

Arguments

path

Path to a GeoTIFF file.

Value

A single character string containing the XML, or NA_character_.

Examples


f <- tempfile(fileext = ".tif")
df <- data.frame(x = 1:4, y = rep(1:2, each = 2), band1 = as.double(1:4))
write_tiff(df, f, metadata = "<GDALMetadata></GDALMetadata>")
tiff_metadata(f)
unlink(f)



vectra documentation built on May 8, 2026, 9:06 a.m.