creates a GDAL vrt file starting from a Raster
object or
file name.
create_virtrast(in_rast, out_vrt_file = NULL, out_extent = NULL, verbose = TRUE)
in_rast | a |
---|---|
out_vrt_file |
|
out_extent |
|
verbose | If FALSE, processing messages are suppressed, Default: TRUE |
character
path to the created vrt file
library(sprawl.data) in_file <- system.file("extdata/MODIS_test", "EVIts_test.tif", package = "sprawl.data") in_rast <- read_rast(in_file, bands = 5) vrt <- create_virtrast(in_rast)#>vrt#> [1] "/tmp/Rtmpzfhi9J/file7852301873f6.vrt"#> class : RasterLayer #> dimensions : 447, 331, 147957 (nrow, ncol, ncell) #> resolution : 231.6564, 231.6564 (x, y) #> extent : 12897004, 12973683, 1685995, 1789545 (xmin, xmax, ymin, ymax) #> coord. ref. : +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs #> data source : /tmp/Rtmpzfhi9J/file7852301873f6.vrt #> names : file7852301873f6 #> values : -323, 8706 (min, max) #>