A lightweight diagnostic that tries to open the specified path via GDAL
and returns TRUE if successful, FALSE if GDAL cannot open
it. Stops with an informative error if the package was built without
GDAL support.
Examples
# \donttest{
if (has_gdal()) {
gdal_can_open(system.file("extdata", "tiny.tif", package = "xbioclim"))
}
#> Warning: GDAL Error 4: /tmp/RtmpRzND6Y/file31e66f3fb248.tif: No such file or directory
#> [1] TRUE
# }