Skip to content

Commit

Permalink
use BitArray for burning buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Sep 30, 2023
1 parent a0f6184 commit ded6f1e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/polygon_ops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -743,12 +743,8 @@ function _init_bools(to, dims::DimTuple, T::Type, data; collapse::Union{Bool,Not
end

function _alloc_bools(to, dims::DimTuple, ::Type{Bool}; missingval=false, metadata=NoMetadata(), kw...)
if length(dims) > 2
# Use a BitArray
return Raster(falses(size(dims)), dims; missingval, metadata) # Use a BitArray
else
return Raster(zeros(Bool, size(dims)), dims; missingval, metadata) # Use a BitArray
end
# Use a BitArray
return Raster(falses(size(dims)), dims; missingval, metadata) # Use a BitArray
end
function _alloc_bools(to, dims::DimTuple, ::Type{T}; missingval=false, metadata=NoMetadata(), kw...) where T
# Use an `Array`
Expand Down

0 comments on commit ded6f1e

Please sign in to comment.