raster_to_filenames: Extract filenames from all Raster* objects.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/raster_to_filenames.R

Description

Extract filenames from all Raster* objects.

Usage

1

Arguments

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.

Details

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 "".

Value

Character vector of filenames.

Author(s)

Jonathan A. Greenberg

See Also

filename

Examples

1
2
3
4
5
6
7
8
{ 
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)
}

gearslaboratory/spatial.tools documentation built on Feb. 14, 2020, 12:36 a.m.