raster_to_filenames {spatial.tools} | R Documentation |
Extract filenames from all Raster* objects.
raster_to_filenames(x, unique = FALSE)
x |
Raster*. A Raster* object (even one without values/in memory) to determine the filename(s). |
unique |
Logical. Only return unique filenames? If FALSE, one filename per layer. |
This is an expansion of filename() that allows for RasterStacks, in-memory Raster*s, and Raster*s without values. If a filename is not found, the entry will be "".
Character vector of filenames.
Jonathan A. Greenberg
{ library("raster") tahoe_highrez <- brick(system.file("external/tahoe_highrez.tif", package="spatial.tools")) raster_to_filenames(tahoe_highrez) raster_to_filenames(tahoe_highrez,unique=TRUE) nodata <- raster() raster_to_filenames(nodata) }