Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix gdal_addo() #2323

Merged
merged 1 commit into from
Jan 26, 2024
Merged

fix gdal_addo() #2323

merged 1 commit into from
Jan 26, 2024

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
7 checks passed
@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