align_rasters: Aligns raster files

Description Usage Arguments Details Value Author(s) See Also

View source: R/align_rasters.R

Description

Aligns a raster to a reference raster.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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).

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.

Value

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

Author(s)

Jonathan A. Greenberg (gdalUtils@estarcion.net)

See Also

gdalwarp


gdalUtils documentation built on Feb. 14, 2020, 1:08 a.m.