Learn R Programming

leastcostpath (version 1.8.7)

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)

Value

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

Arguments

ncells

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

Author

Joseph Lewis

Examples

Run this code
w <- wide_path_matrix(9)

Run the code above in your browser using DataLab