wide_path_matrix: Create a wide path matrix

View source: R/wide_path_matrix.R

wide_path_matrixR Documentation

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

Author(s)

Joseph Lewis

Examples

w <- wide_path_matrix(9)

leastcostpath documentation built on June 3, 2022, 9:06 a.m.