combine_rasters: Combines multiple rasters into one

View source: R/combine_rasters.R

combine_rastersR Documentation

Combines multiple rasters into one

Description

Combines multiple rasters into one by using merge after first reprojecting or resampling and aligning rasters by matching them up with a a specified origin, resolution, and coordinate reference system, or that of a reference raster.

Usage

combine_rasters(
  raster_list,
  ref_rast = NULL,
  desired_origin,
  desired_res,
  desired_crs,
  method = "bilinear",
  display_progress = TRUE,
  normalize = FALSE,
  use_mean = FALSE
)

Arguments

raster_list

a list of rasters

ref_rast

reference raster with desired properties (Alternatively can supply desired_origin, desired_res, and desired_crs)

desired_origin

desired origin of output raster as a vector with length 2 (x,y)

desired_res

desired resolution of output raster. Either an integer or a vector of length 2 (x,y)

desired_crs

desired coordinate reference system of output raster (CRS class)

method

resampling method. Either "bilinear" for bilinear interpolation (the default), or "ngb" for using the nearest neighbor

display_progress

Logical specifying whether or not to indicate progress

normalize

Logical (False by Default) indicating whether to z-score normalize raster layer before merge (Useful for merging backscatter)

use_mean

Logical (False by Default) indicating whether to take mean value of layers in overlapping area. If FALSE calls raster::merge. If TRUE calls raster::mosaic(fun=mean).


ailich/mytools documentation built on Jan. 7, 2023, 11:16 a.m.