pathdistGen: Generate a stack of path distance raster objects

Description Usage Arguments Value Author(s) Examples

View source: R/pathdistGen.R

Description

Generate a stack of path accumulated distance raster objects

Usage

1
pathdistGen(spdf, costras, range, yearmon = "default", progressbar = TRUE)

Arguments

spdf

SpatialPointsDataFrame object

costras

RasterLayer cost raster

range

numeric. Range of interpolation neighborhood

yearmon

character. String specifying the name of the spdf

progressbar

logical show progressbar during processing?

Value

RasterStack object of path distances

Author(s)

Joseph Stachelek

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
spdf <- data.frame(rnorm(2))
xy <- data.frame(x = c(4, 2), y = c(8, 4))
coordinates(spdf) <- xy

m <- matrix(NA, 10, 10)
costras <- raster(m, xmn = 0, xmx = ncol(m), ymn = 0, ymx = nrow(m))
costras[] <- runif(ncell(costras), min = 1, max = 10)
#introduce spatial gradient
for(i in 1:nrow(costras)){
 costras[i,] <- costras[i,] + i
 costras[,i] <- costras[,i] + i
}

rstack <- pathdistGen(spdf, costras, 100, progressbar = FALSE)

jsta/ipdw documentation built on July 27, 2020, 11:41 a.m.