Skip to contents

Construct A warped VRT or warped VRT collection.

Usage

vrt_warp(x, t_srs, te, tr, resampling, quiet)

# S3 method for class 'vrt_block'
vrt_warp(
  x,
  t_srs,
  te,
  tr,
  resampling = c("bilinear", "near", "cubic", "cubicspline", "lanczos", "average", "rms",
    "mode", "max", "min", "med", "q1", "q3", "sum"),
  quiet = TRUE
)

# S3 method for class 'vrt_collection'
vrt_warp(
  x,
  t_srs,
  te,
  tr,
  resampling = c("bilinear", "near", "cubic", "cubicspline", "lanczos", "average", "rms",
    "mode", "max", "min", "med", "q1", "q3", "sum"),
  quiet = TRUE
)

Arguments

x

A vrt_collection or vrt_block (most likely the former).

t_srs

character target SRS must be a numeric EPSG code, or SRS like character such as a proj4 string or WKT.

te

numeric vector of the target extent in the form c(xmin, ymin, xmax, ymax) using the same SRS as in t_srs.

tr

numeric vector of the target resolution in the form c(xres, yres)

resampling

character vector of the resampling methods to be used for each band. The default is "bilinear". "near" sampling will be used for the mask_band if provided.

quiet

logical indicating whether to suppress progress bar.

Details

This function generates warped VRT objects types. This is particularly useful when we want to create a vrt_stack but our input images span multiple spatial reference systems. In such a situation, before warping our input data we must align with our desired oputput grid.