Converts the sparse run/edge/line tables from burn() into a dense matrix.

materialise_chunk(x, fun = c("sum", "id"))

materialize_chunk(x, fun = c("sum", "id"))

Arguments

x

A controlledburn object returned by burn().

fun

character, the pixel function:

"sum"

(default) Polygon runs contribute 1, edges contribute their coverage fraction, lines contribute length, points contribute 1. Values accumulate additively across overlapping geometries. Background is 0.

"id"

Write the geometry id ($runs$id, $edges$id, etc.) into each cell. When geometries overlap, the last id wins. Background is NA.

Value

A numeric matrix with dimensions nrow × ncol.