Learn R Programming

leastcostpath (version 1.7.4)

wide_path_matrix: Create a wide path matrix

Description

Creates a wide path matrix to be used when calculating wide path least cost paths. This function will return an odd-dimension matrix approximating the shape of an octogon. The centre cell of the matrix has a value of 0 and represents the focal cell. See focal, focalWeight and adjacent for more information.

Usage

wide_path_matrix(ncells)

Arguments

ncells

numeric value. Dimension of wide path matrix. Note that the value refers to the number of cells and not distance

Value

matrix wide path matrix used when calculating wide path least cost paths via create_wide_lcp

Examples

Run this code
# NOT RUN {
w <- wide_path_matrix(9)
# }

Run the code above in your browser using DataLab