Converts a spatial feature (e.g., a polygon sf object) into a binary matrix
mask aligned with the reference DEM used for runout simulations.
Arguments
- x
An sf object representing the feature of interest (e.g., a polygon).
- y
A SpatRaster (e.g., DEM) used as the reference for rasterization.
Value
A binary matrix the same size as y, with 1 indicating presence of the feature and 0 elsewhere.
Examples
if (FALSE) { # \dontrun{
feature_mask <- makeConnFeature(my_sf_polygon, my_dem)
} # }