Learn R Programming

gdalraster (version 1.11.1)

copyDatasetFiles: Copy the files of a dataset

Description

copyDatasetFiles() copies all the files associated with a dataset. Wrapper for GDALCopyDatasetFiles() in the GDAL API.

Usage

copyDatasetFiles(new_filename, old_filename, format = "")

Value

Logical TRUE if no error or FALSE on failure.

Arguments

new_filename

New name for the dataset (copied to).

old_filename

Old name for the dataset (copied from).

format

Raster format short name (e.g., "GTiff"). If set to empty string "" (the default), will attempt to guess the raster format from old_filename.

See Also

GDALRaster-class, create(), createCopy(), deleteDataset(), renameDataset(), vsi_copy_file()

Examples

Run this code
lcp_file <- system.file("extdata/storm_lake.lcp", package="gdalraster")
ds <- new(GDALRaster, lcp_file)
ds$getFileList()
ds$close()

lcp_tmp <- file.path(tempdir(), "storm_lake_copy.lcp")
copyDatasetFiles(lcp_tmp, lcp_file)
ds_copy <- new(GDALRaster, lcp_tmp)
ds_copy$getFileList()
ds_copy$close()

deleteDataset(lcp_tmp)

Run the code above in your browser using DataLab