R: Virtual Raster Tiles

vrt {terra} | R Documentation

## Virtual Raster Tiles

### Description

Create a Virtual Raster Tiles (VRT) dataset from file-based raster datasets.

### Usage

    ## S4 method for signature 'character'
    vrt(x, filename="", overwrite=FALSE)

### Arguments

`x` | character. Filenames of raster "tiles". See `tiles`
`filename` | character. Output VRT filename
`overwrite` | logical. Should `filename` be overwritten if it exists?

### Value

SpatRaster

### Examples

    r <- rast(ncols=100, nrows=100)
    values(r) <- 1:ncell(r)
    x <- rast(ncols=2, nrows=2)
    filename <- paste0(tempfile(), "_.tif")
    ff <- makeTiles(r, x, filename)
    ff

    vrtfile <- paste0(tempfile(), ".vrt")
    v <- vrt(ff, vrtfile)
    head(readLines(vrtfile))
    v

[Package terra version 1.4-7 Index]