R/extract_burn.R
extract_burn.RdQueries the sparse tables directly; no dense matrix is created.
For points at cell centres this reproduces materialize_chunk()
exactly:
extract_burn(x, xy, fun) == materialize_chunk(x, fun)[cbind(row, col)]
extract_burn(x, xy, fun = c("id", "sum"))A controlledburn object returned by burn().
A two-column matrix or data.frame of x, y coordinates in the CRS of the burn.
character, "id" (last geometry written wins, NA
background) or "sum" (accumulated coverage/length/count, 0
background). Same semantics as materialize_chunk().
A numeric vector of length nrow(xy). Points outside the
grid extent are NA for both funs.
Interior runs are matched by row equality plus column interval containment; edges, lines, and points by exact (row, col) match. Cost is O(points + hits), independent of grid dimension.