Skip to content

Conversation

@ethanplunkett
Copy link
Contributor

Fix bug that prevented using config_options argument to gdal_addo()

Reproducible example:

    library(sf)
    dir = file.path(tempdir(), "gdal_addo")
    dir.create(dir)
    tif = file.path(dir, "geomatrix.tif")
    file.copy(system.file("tif/geomatrix.tif", package = "sf"), tif, overwrite = TRUE)
    gdal_addo(tif, read_only = TRUE, config_options = c(COMPRESS_OVERVIEW="LZW"))

Previously threw error: Error: config_options should be a character vector with names, as in c(key="value")

The problem was caused by calling as.character(config_options) which stripped the names before passing it on to CPL_gdaladdo()

Now works with config_options, allowing compressed overviews
@edzer edzer merged commit b4e355d into r-spatial:main Jan 26, 2024
@edzer
Copy link
Member

edzer commented Jan 26, 2024

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants