You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I run rasterize with the fill keyword and give it a symbol of a :nonexistingcolumn I get the following confusing error.
Here shp is a Shapefile.Table and bbox is an Extent type.
julia> shpras =rasterize(shp; to=bbox, res=res, fill=:nonexistingcolumn)
ERROR: MethodError:zero(::Type{Union{}}) is ambiguous. Candidates:zero(::Union{Type{P}, P}) where P<:Dates.Periodin Dates at /home/fcremer/.julia/juliaup/julia-1.8.4+0.x64.linux.gnu/share/julia/stdlib/v1.8/Dates/src/periods.jl:53zero(t::Union{Type{<:Zarr.DateTime64}, Zarr.DateTime64}) in Zarr at /home/fcremer/.julia/packages/Zarr/tmr2s/src/metadata.jl:47zero(::Type{<:AbstractIrrational}) in Base at irrationals.jl:151zero(::Type{C}) where C<:(ColorTypes.Colorant{T, 5} where T)in ColorTypes at /home/fcremer/.julia/packages/ColorTypes/1dGw6/src/traits.jl:476zero(::Type{C}) where C<:(ColorTypes.Colorant{T, 4} where T)in ColorTypes at /home/fcremer/.julia/packages/ColorTypes/1dGw6/src/traits.jl:475zero(::Type{C}) where C<:(ColorTypes.Colorant{T, 3} where T)in ColorTypes at /home/fcremer/.julia/packages/ColorTypes/1dGw6/src/traits.jl:474zero(::Type{C}) where C<:(ColorTypes.Colorant{T, 2} where T)in ColorTypes at /home/fcremer/.julia/packages/ColorTypes/1dGw6/src/traits.jl:473zero(::Type{C}) where C<:(ColorTypes.Colorant{T, 1} where T)in ColorTypes at /home/fcremer/.julia/packages/ColorTypes/1dGw6/src/traits.jl:472zero(::Type{X}) where X<:FixedPointNumbers.FixedPointin FixedPointNumbers at /home/fcremer/.julia/packages/FixedPointNumbers/HAGk2/src/FixedPointNumbers.jl:107zero(::Type{T}) where T<:Numberin Base at number.jl:297zero(::Type{<:ChainRulesCore.NotImplemented}) in ChainRulesCore at /home/fcremer/.julia/packages/ChainRulesCore/C73ay/src/tangent_types/notimplemented.jl:52zero(::Type{<:ChainRulesCore.AbstractTangent}) in ChainRulesCore at /home/fcremer/.julia/packages/ChainRulesCore/C73ay/src/tangent_types/abstract_zero.jl:58zero(a::Type{SA}) where SA<:StaticArraysCore.StaticArrayin StaticArrays at /home/fcremer/.julia/packages/StaticArrays/jA1zK/src/linalg.jl:96
Possible fix, define
zero(::Type{Union{}})
Stacktrace:
[1] _rasterize(to::Tuple{X{Projected{Float64, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, DimensionalData.Dimensions.LookupArrays.ForwardOrdered, DimensionalData.Dimensions.LookupArrays.Regular{Float64}, DimensionalData.Dimensions.LookupArrays.Intervals{DimensionalData.Dimensions.LookupArrays.Start}, DimensionalData.Dimensions.LookupArrays.NoMetadata, Nothing, Nothing, Rasters.AutoDim}}, Y{Projected{Float64, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, DimensionalData.Dimensions.LookupArrays.ForwardOrdered, DimensionalData.Dimensions.LookupArrays.Regular{Float64}, DimensionalData.Dimensions.LookupArrays.Intervals{DimensionalData.Dimensions.LookupArrays.Start}, DimensionalData.Dimensions.LookupArrays.NoMetadata, Nothing, Nothing, Rasters.AutoDim}}}, ::Nothing, data::Shapefile.Table{Union{Missing, Shapefile.Polygon}}; fill::Symbol, name::Symbol, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Rasters ~/.julia/packages/Rasters/gV0im/src/methods/rasterize.jl:119
[2] #_rasterize#507
@ ~/.julia/packages/Rasters/gV0im/src/methods/rasterize.jl:90 [inlined]
[3] _rasterize(to::Extent{(:X, :Y), Tuple{Tuple{Float64, Float64}, Tuple{Float64, Float64}}}, data::Shapefile.Table{Union{Missing, Shapefile.Polygon}}; fill::Symbol, name::Symbol, res::Float64, size::Nothing, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Rasters ~/.julia/packages/Rasters/gV0im/src/methods/rasterize.jl:87
[4] #rasterize#502
@ ~/.julia/packages/Rasters/gV0im/src/methods/rasterize.jl:66 [inlined]
[5] top-level scope
@ REPL[35]:1
The text was updated successfully, but these errors were encountered:
If I run rasterize with the fill keyword and give it a symbol of a :nonexistingcolumn I get the following confusing error.
Here shp is a Shapefile.Table and bbox is an Extent type.
The text was updated successfully, but these errors were encountered: