Learn R Programming

gdalUtils (version 2.0.3.2)

align_rasters: Aligns raster files

Description

Aligns a raster to a reference raster.

Usage

align_rasters(
  unaligned,
  reference,
  dstfile,
  output_Raster = FALSE,
  nThreads = 1,
  projres_only = FALSE,
  verbose = FALSE,
  ...
)

Arguments

unaligned

Character. The filename of a raster to be aligned to the reference raster.

reference

Character. The filename of a raster to be used as the reference for the alignment. Syncing will use the reference's projection, resolution, and extent.

dstfile

Character. The filename of the synchronized output file.

output_Raster

Logical. Return output dst_dataset as a RasterBrick?

nThreads

Numeric or Character. If numeric, the number of threads to use. Setting to > 1 enables multithreaded execution. Can also be "ALL_CPUS" to use all available CPUS. Default is 1.

projres_only

Logical. Matches projection and pixel resolution only, but leaves the spatial extent unchanged. Useful for mosaicking. Default = FALSE.

verbose

Logical. Enable verbose execution? Default is FALSE.

...

parameters to be passed to gdalwarp (e.g. resampling approach).

Value

Either NULL or a RasterBricks depending on whether output_Raster is set to TRUE.

Details

Aligns a raster to the extent and projection of a reference raster and matches the resolution of the reference raster. This is helpful in preparing multiple files of different projections, resolutions, extents, and rotations for performing map algebra or change detection.

See Also

gdalwarp