Add required prefixes, or remove them.

vsicurl(x, sign = FALSE)

driver(x, driver = "")

netcdf(x)

unprefix(x)

unvsicurl(x)

Arguments

x

character vector, of data source names (file paths, urls, database connection strings, or GDAL dsn)

sign

configure for automatic Planetary Computer signing by GDAL

driver

character vector of appropriate GDAL driver name

Value

character vector

Examples

vsicurl("https://netcdf-r-us.org/f.nc")
#> [1] "/vsicurl/https://netcdf-r-us.org/f.nc"

driver("somefile.h5", "HDF5")
#> [1] "HDF5:somefile.h5"

unvsicurl("/vsicurl/https://netcdf-r-us.org/f.nc")
#> [1] "https://netcdf-r-us.org/f.nc"

unprefix("NETCDF:/u/user/somefile.nc")
#> [1] "/u/user/somefile.nc"

## MPC signing
mpc <- "https://sentinel2l2a01.blob.core.windows.net/sentinel2-l2/.../T43DFE_B04_10m.tif"
vsicurl(mpc , sign = TRUE)
#> [1] "/vsicurl?pc_url_signing=yes&url=https://sentinel2l2a01.blob.core.windows.net/sentinel2-l2/.../T43DFE_B04_10m.tif"