-
Notifications
You must be signed in to change notification settings - Fork 4
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
Limit filetype options for tar_terra_sds()
and tar_terra_sprc()
#95
Comments
Error message is:
That seems explicit enough to not worry about adding guard rails that we'd have to maintain as new drivers get added. If you agree @njtierney, feel free to close this issue. |
Can you provide a bit more context around the code that produces this error? Or is it linked in the issue above? |
Sure, here's an example that produces this error: targets::tar_dir({ # tar_dir() runs code from a temporary directory.
targets::tar_script({
library(geotargets)
elev_scale <- function(z = 1, projection = "EPSG:4326") {
terra::project(
terra::rast(system.file("ex", "elev.tif", package = "terra")) * z,
projection
)
}
list(
tar_terra_sprc(
raster_elevs,
command = terra::sprc(list(
elev_scale(1),
elev_scale(2, "+proj=igh")
)),
filetype = "MFF2"
)
)
})
targets::tar_make()
}) The errors don't show up the same when using the
|
Pros of doing our own checking:
Cons:
After seeing your changes in #97 and realizing that APPEND_SUBDATSET requires GDAL ≥ 3.0, I'm more convinced that we should intervene here. |
It would be worthwhile testing with a driver that does not support sub-datasets first to see if the error message is informative—perhaps if it is we don't actually need to do anything
Originally posted by @brownag in #59
The text was updated successfully, but these errors were encountered: