diff --git a/ext/RastersArchGDALExt/warp.jl b/ext/RastersArchGDALExt/warp.jl index ef38806f4..1559cf474 100644 --- a/ext/RastersArchGDALExt/warp.jl +++ b/ext/RastersArchGDALExt/warp.jl @@ -72,7 +72,7 @@ end function _warp(A::AbstractRaster, flags::Dict; filename=nothing, suffix="", kw...) filename = RA._maybe_add_suffix(filename, suffix) - flagvect = reduce([flags...]; init=[]) do acc, (key, val) + flagvect = reduce([flags...]; init=String[]) do acc, (key, val) append!(acc, String[_asflag(key), _stringvect(val)...]) end tempfile = isnothing(filename) ? nothing : tempname() * ".tif" @@ -84,7 +84,7 @@ function _warp(A::AbstractRaster, flags::Dict; filename=nothing, suffix="", kw.. # Either read the MEM dataset, or get the filename as a FileArray # And permute the dimensions back to what they were in A p_raster = _maybe_permute_from_gdal(raster, dims(A)) - # Either read the MEM dataset to an Array, or keep a filename base raster lazy + # Either read the MEM dataset to an Array, or keep the raster lazy return isnothing(filename) ? read(p_raster) : p_raster end end diff --git a/src/methods/burning/point.jl b/src/methods/burning/point.jl index bc7b0e499..935481cd5 100644 --- a/src/methods/burning/point.jl +++ b/src/methods/burning/point.jl @@ -34,7 +34,7 @@ end _fill_index!(x, fill, I) else sector = CartesianIndices(map(i -> i:i, I)) - Base.lock(lock, sector) + Base.lock(lock) _fill_index!(x, fill, I) Base.unlock(lock) end diff --git a/src/methods/rasterize.jl b/src/methods/rasterize.jl index 70a36bb18..22a6d9d76 100644 --- a/src/methods/rasterize.jl +++ b/src/methods/rasterize.jl @@ -574,7 +574,7 @@ function _rasterize!(A, ::GI.AbstractGeometryTrait, geom, fill, r::Rasterizer; a hasburned = any(bools) if hasburned # Avoid race conditions - isnothing(lock) || Base.lock(lock, V) + isnothing(lock) || Base.lock(lock) _fill!(V, bools, fill, op, init, missingval) isnothing(lock) || Base.unlock(lock) end @@ -584,7 +584,7 @@ end # Fill points function _rasterize!(A, trait::GI.AbstractPointTrait, point, fill, r::Rasterizer; allocs=nothing) # Avoid race conditions whern Point is in a mixed set of Geometries - isnothing(r.lock) || Base.lock(r.lock, A) + isnothing(r.lock) || Base.lock(r.lock) hasburned = _fill_point!(A, trait, point; fill, r.lock) isnothing(r.lock) || Base.unlock(r.lock) # for all points we avoid parallel rasterization completely - this method should not be hit often