genMosaicList: Mosaic a list of raster images

Description Usage Arguments Details Value Examples

View source: R/genMosaicList.R

Description

genMosaicList makes a single mosaic from a list of raster images.

Usage

1
genMosaicList(imageList, fun = "max", verbose = TRUE)

Arguments

imageList

list of RasterLayers.

fun

the function being applied to pixels that overlap.

verbose

logical argument. If TRUE, the function prints the running steps and warnings.

Details

This is a helper function used by other functions in this package. It combines a list of raster images with different geolocations. If images overlap, the function applies fun to calculate the new values for the overlapping pixels. If not specified, fun = max.

Value

a raster with the mosaicked images.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# create simulated rasters
img <- matrix(1:16, ncol = 4, byrow = TRUE)
r1 <- raster(img)
r2 <- r1
r3 <- r1
extent(r2) <- extent(1, 2, 1, 2)
extent(r3) <- extent(1, 2, 0, 1)
imageList <- list(r1, r2, r3)
# mosaic simulated rasters
mr <- genMosaicList(imageList)
spplot(mr)

RGISTools documentation built on July 2, 2020, 3:58 a.m.