vapour_sds_names | R Documentation |
A subdataset is a collection abstraction for a number of variables within a single GDAL source. If there's only one variable the datasource and the variable have the same data source string. If there is more than one the subdatasets have the form DRIVER:"datasourcename":varname. Each subdataset name can stand in place of a data source name that has only one variable, so we always treat a source as a subdataset, even if there's only one.
vapour_sds_names(x)
x |
a data source string, filename, database connection string, or other URL |
Returns a character vector of 'subdatasets. In the case of a normal data source, with no subdatasets the value is simply the
datasource'.
If the raw SDS names contain spaces these are replaced by '%20' escape strings. A specific example is "WCS:https://elevation.nationalmap.gov:443" with request "arcgis/services/3DEPElevation/ImageServer/WCSServer?version=2.0.1&coverage=DEP3Elevation_Hillshade Gray". This function will return "..DEP3Elevation_Hillshade%20Gray". See wiki post for more details.
character vector of subdataset names, or just the source itself if no SDS are present
f <- system.file("extdata/gdal", "sds.nc", package = "vapour")
## protect from error with netcdf problems
result <- try(vapour_sds_names(f), silent = TRUE)
if (!inherits(result, "try-error")) {
print(result)
}
vapour_sds_names(system.file("extdata", "sst.tif", package = "vapour"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.