library(geotargets)
# set an option
geotargets_option_set(gdal_raster_driver = "GPKG")
# as expected
geotargets_option_get("gdal_raster_driver")
#> [1] "GPKG"
# set a different option
geotargets_option_set(gdal_vector_driver = "GPKG")
# both should be "GPKG"
geotargets_option_get("gdal_vector_driver")
#> NULL
geotargets_option_get("gdal_raster_driver")
#> NULL
Did a blunt-force solution to this in e1b039f which I accidentally pushed to master. I feel like there has to be a more programmatic way to do this though, so I'll keep this open for a bit in case I think of anything or anyone has any suggestions.
One more thing I noticed after #45
This way of setting options all at once is the issue, due to default NULL argument values: https://github.com/njtierney/geotargets/blob/c148f7b9d7e8a94430133f1e978fce2d96d84110/R/geotargets-option.R#L40-L45
Note also that the wrong arguments are set for the vector options. Should use