VeloxRaster_sumFocal: Sum focal

Description Arguments Details Value Examples

Description

Applies a focal sum with weights matrix weights to a VeloxRaster.

Arguments

weights

A numeric matrix of weights. Both dimensions must be uneven.

bands

Numeric vector indicating bands where filter is applied.

Details

Padding is currently not implemented.

Value

Void.

Examples

1
2
3
4
5
6
7
8
## Make VeloxRaster with two bands
mat1 <- matrix(1:100, 10, 10)
mat2 <- matrix(100:1, 10, 10)
vx <- velox(list(mat1, mat2), extent=c(0,1,0,1), res=c(0.1,0.1),
            crs="+proj=longlat +datum=WGS84 +no_defs")
## Sum focal
weights <- matrix(1, 5, 5)
vx$sumFocal(weights=weights, bands=c(1,2))

velox documentation built on May 2, 2019, 6:01 a.m.