diff --git a/src/array.jl b/src/array.jl index 42c2eaab..4e75fb72 100644 --- a/src/array.jl +++ b/src/array.jl @@ -239,9 +239,6 @@ struct Raster{T,N,D<:Tuple,R<:Tuple,A<:AbstractArray{T,N},Na,Me,Mi<:Union{T,Noth new{T,N,D,R,A,Na,Me,typeof(missingval1)}(data, dims, refdims, name, metadata, missingval1) end end -Raster(f::Function, args...; kw...) = Raster(args...; f, kw...) -# For ambiguity with dataset methods -Raster(f::Function, s::AbstractString; kw...) = Raster(s; f, kw...) # Create a Raster from and AbstractArray and dims function Raster(A::AbstractArray{T,N}, dims::Tuple; refdims=(), diff --git a/src/utils.jl b/src/utils.jl index 6cafda87..69ccd0fb 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -97,7 +97,7 @@ _type_missingval(::Type{T}) where T = _type_missingval1(Missings.nonmissingtype( _type_missingval1(::Type{T}) where T<:Number = typemin(T) _type_missingval1(::Type{T}) where T<:Unsigned = typemax(T) -_type_missingval1(::Type{<:AbstractString}) where T = T("") +_type_missingval1(::Type{T}) where T<:AbstractString = T("") _fix_missingval(::Type, ::Union{NoKW,Nothing}) = nothing _fix_missingval(::AbstractArray, ::Nothing) = nothing diff --git a/test/warp.jl b/test/warp.jl index b23c13a6..7e8f2e73 100644 --- a/test/warp.jl +++ b/test/warp.jl @@ -14,7 +14,6 @@ gdalpath = maybedownload(url) @test size(warped) == (720, 721) # the crs is rotated so the image is rotated an all four corners should be missing missingval(warped) === 0xff - parent(warped) @test warped[1, 1] === warped[1, end] === warped[end, 1] === warped[end, end] === 0xff == missingval(warped) # now compute mean squared error of the back transformation res = map(step, lookup(r))