gdalbuildvrt: Interface to GDAL's gdalbuildvrt utility

Description Usage Arguments Value Author(s) Examples

View source: R/gdalbuildvrt.R

Description

This function provides an interface mirroring that of the GDAL command-line app gdalbuildvrt. For a description of the utility and the arguments that it takes, see the documentation at https://gdal.org/programs/gdalbuildvrt.html.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
gdalbuildvrt(
  gdalfile,
  output.vrt,
  ...,
  tileindex,
  resolution,
  te,
  tr,
  tap,
  separate,
  b,
  sd,
  allow_projection_difference,
  optim,
  q,
  addalpha,
  hidenodata,
  srcnodata,
  vrtnodata,
  ignore_srcmaskband,
  a_srs,
  r,
  oo,
  input_file_list,
  overwrite,
  dryrun = FALSE
)

Arguments

gdalfile

Character vector supplying file paths to one or more input datasets.

output.vrt

Character. Path to output VRT file. Typically, output file will have suffix ".vrt".

...

Here, a placeholder argument that forces users to supply exact names of all subsequent formal arguments.

tileindex, resolution, te, tr, tap, separate, b, sd

See the GDAL project's gdalbuildvrt documentation for details.

allow_projection_difference, q, optim, addalpha, hidenodata

See the GDAL project's gdalbuildvrt documentation for details.

srcnodata, vrtnodata, ignore_srcmaskband, a_srs, r, oo

See the GDAL project's gdalbuildvrt documentation for details.

input_file_list, overwrite

See the GDAL project's gdalbuildvrt documentation for details.

dryrun

Logical (default FALSE). If TRUE, instead of executing the requested call to GDAL, the function will print the command-line call that would produce the equivalent output.

Value

None. Called instead for its side effect.

Author(s)

Joshua O'Brien

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Prepare file paths
td <- tempdir()
out_vrt <- file.path(td, "out.vrt")
layer1 <-
    system.file("external/tahoe_lidar_bareearth.tif",
                package = "gdalUtils")
layer2 <-
    system.file("external/tahoe_lidar_highesthit.tif",
                package = "gdalUtils")

## Build VRT and check that it works
gdalbuildvrt(gdalfile = c(layer1, layer2), output.vrt = out_vrt)
gdalinfo(out_vrt)

gdalUtilities documentation built on Oct. 26, 2021, 5:06 p.m.