See a two-dimensional slice of an array as an ordinary raster
Source:R/z-multidim.R
as_classic_dataset.RdThis is the bridge back to the rest of the package: the result is a
GDALDataset, so read_raster(), its geotransform property and the band properties
all work on it. The array must have exactly two dimensions; take a
get_view() of it first if it has more.