Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New release of GeoMakie (v0.7.6) breaks existing code #285

Closed
ph-kev opened this issue Nov 11, 2024 · 2 comments
Closed

New release of GeoMakie (v0.7.6) breaks existing code #285

ph-kev opened this issue Nov 11, 2024 · 2 comments

Comments

@ph-kev
Copy link

ph-kev commented Nov 11, 2024

Code that uses GeoMakie now does not work. See the example of code below which does not work:

using Makie, GeoMakie, CairoMakie

lons = -180:180
lats = -90:90

field = [exp(cosd(l)) + 3(y/90) for l in lons, y in lats]

fig = Figure()
ax1 = GeoAxis(fig[1,1])
contourf!(ax1, lons, lats, field)
fig

which gives the following error:

ERROR: BoundsError: attempt to access Tuple{Float32, Float32} at index [3]
Stacktrace:
  [1] getindex
    @ ./tuple.jl:31 [inlined]
  [2] getindex
    @ ~/.julia/packages/GeometryBasics/ebXl0/src/fixed_arrays.jl:92 [inlined]
  [3] macro expansion
    @ ~/.julia/packages/GeometryBasics/ebXl0/src/fixed_arrays.jl:65 [inlined]
  [4] GeometryBasics.Point{3, Float64}(x::GeometryBasics.Point{2, Float32})
    @ GeometryBasics ~/.julia/packages/GeometryBasics/ebXl0/src/fixed_arrays.jl:62
  [5] extract_three_unique_and_independent_points(points::Vector{Vector{GeometryBasics.Point{2, Float32}}})
    @ GeoMakie ~/.julia/packages/GeoMakie/zF7ji/src/triangulation3d.jl:101
  [6] poly_convert(polygon::GeometryBasics.Polygon{…}, transform_func::Proj.Transformation)
    @ GeoMakie ~/.julia/packages/GeoMakie/zF7ji/src/triangulation3d.jl:52
  [7] _broadcast_getindex_evalf
    @ ./broadcast.jl:673 [inlined]
  [8] _broadcast_getindex
    @ ./broadcast.jl:646 [inlined]
  [9] getindex
    @ ./broadcast.jl:605 [inlined]
 [10] copy
    @ ./broadcast.jl:906 [inlined]
 [11] materialize
    @ ./broadcast.jl:867 [inlined]
 [12] poly_convert(polys::Vector{GeometryBasics.Polygon{…}}, transform_func::Proj.Transformation)
    @ Makie ~/.julia/packages/Makie/pFPBw/src/basic_recipes/poly.jl:80
 [13] map(f::typeof(Makie.poly_convert), scene::Union{…}, arg1::Observable{…}, args::Observable{…}; ignore_equal_values::Bool, priority::Int64)
    @ Makie ~/.julia/packages/Makie/pFPBw/src/scenes.jl:177
 [14] map
    @ ~/.julia/packages/Makie/pFPBw/src/scenes.jl:174 [inlined]
 [15] plot!(plot::Poly{Tuple{Vector{GeometryBasics.Polygon{}}}})
    @ Makie ~/.julia/packages/Makie/pFPBw/src/basic_recipes/poly.jl:151
 [16] connect_plot!(parent::Plot{Makie.contourf, Tuple{Vector{…}, Vector{…}, Matrix{…}}}, plot::Poly{Tuple{Vector{…}}})
    @ Makie ~/.julia/packages/Makie/pFPBw/src/interfaces.jl:395
 [17] plot!(scene::Plot{Makie.contourf, Tuple{Vector{…}, Vector{…}, Matrix{…}}}, plot::Poly{Tuple{Vector{…}}})
    @ Makie ~/.julia/packages/Makie/pFPBw/src/interfaces.jl:412
 [18] _create_plot!(F::Function, attributes::Dict{…}, scene::Plot{…}, args::Observable{…})
    @ Makie ~/.julia/packages/Makie/pFPBw/src/figureplotting.jl:391
 [19] poly!(::Plot{…}, ::Vararg{…}; kw::@Kwargs{})
    @ MakieCore ~/.julia/packages/MakieCore/zO6H4/src/recipes.jl:505
 [20] plot!(c::Plot{Makie.contourf, Tuple{Vector{Float64}, Vector{Float64}, Matrix{Float32}}})
    @ Makie ~/.julia/packages/Makie/pFPBw/src/basic_recipes/contourf.jl:134
 [21] connect_plot!(parent::Scene, plot::Plot{Makie.contourf, Tuple{Vector{Float64}, Vector{Float64}, Matrix{Float32}}})
    @ Makie ~/.julia/packages/Makie/pFPBw/src/interfaces.jl:395
 [22] plot!
    @ ~/.julia/packages/Makie/pFPBw/src/interfaces.jl:412 [inlined]
 [23] plot!(axis::GeoAxis, plot::Plot{Makie.contourf, Tuple{Vector{Float64}, Vector{Float64}, Matrix{Float32}}})
    @ GeoMakie ~/.julia/packages/GeoMakie/zF7ji/src/geoaxis.jl:830
 [24] _create_plot!(::Function, ::Dict{Symbol, Any}, ::GeoAxis, ::UnitRange{Int64}, ::Vararg{Any})
    @ GeoMakie ~/.julia/packages/GeoMakie/zF7ji/src/geoaxis.jl:846
 [25] contourf!(::GeoAxis, ::Vararg{Any}; kw::@Kwargs{})
    @ Makie ~/.julia/packages/MakieCore/zO6H4/src/recipes.jl:505
 [26] contourf!(::GeoAxis, ::Vararg{Any})
    @ Makie ~/.julia/packages/MakieCore/zO6H4/src/recipes.jl:503
 [27] top-level scope
    @ ~/Desktop/testing GeoMakie/test.jl:10
@ph-kev ph-kev changed the title New release of GeoMakie breaks existing code New release of GeoMakie (0.7.6) breaks existing code Nov 11, 2024
@ph-kev ph-kev changed the title New release of GeoMakie (0.7.6) breaks existing code New release of GeoMakie (v0.7.6) breaks existing code Nov 11, 2024
@asinghvi17
Copy link
Member

Ah, I guess I didn't test contourf properly - thanks for the update! Will push a patch ASAP.

@asinghvi17
Copy link
Member

I've just released a new version that fixes this, it should be out within 15 minutes. Also added some tests that should ensure that this doesn't happen again.

Sorry about that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants