Is there a way to use the Rasters.jl library to obtain the same effect as the Raster Calculator in QGIS for creating a binary raster? (Where the raster = 1 if it meets the logical criterion, but 0 otherwise).
you could check out
@doc Rasters.boolmask
boolmask(obj::Raster; [missingval])
boolmask(obj; [to, res, size])
boolmask(obj::RasterStack; alllayers = true, kw...)
to create a mask array of Bool values, from another Raster.
From a Condition, say lowerbound < valuerange_you_want < upperbound
one could do
zm = (ds .> lowerbound ) .& (ds .<= upperbound)
zm = boolmask(zm)
A = Rasters.mask(ds; with=zm)
where
ds
is a 2D Raster