Skip to content

Can't display a FeatureCollection #219

Closed

Description

@felixcremer

This is from running the Rasters tests locally.
I can't display the following FeatureCollection.

julia> pointvec = [
           (-20.0, 30.0),
           (-20.0, 10.0),
           (0.0, 10.0),
           (0.0, 30.0),
           (-20.0, 30.0),
       ]
5-element Vector{Tuple{Float64, Float64}}:
 (-20.0, 30.0)
 (-20.0, 10.0)
 (0.0, 10.0)
 (0.0, 30.0)
 (-20.0, 30.0)

julia> vals = [1, 2, 3, 4, 5]
5-element Vector{Int64}:
 1
 2
 3
 4
 5

julia> polygon = ArchGDAL.createpolygon(pointvec)
Geometry: POLYGON ((-20 30,-20 10,0 10,0 30,-20 30))

julia> pointfc = map(GI.getpoint(polygon), vals) do geom, v
           GI.Feature(geom; properties=(val1=v, val2=2.0f0v))
       end |> GI.FeatureCollection;

julia> typeof(pointfc)
GeoInterface.Wrappers.FeatureCollection{Vector{GeoInterface.Wrappers.Feature{@NamedTuple{geometry::Tuple{Float64, Float64}, val1::Int64, val2::Float32}, Nothing, Nothing}}, Nothing, Nothing}

julia> pointfc
FeatureCollection([Feature(Error showing value of type GeoInterface.Wrappers.FeatureCollection{Vector{GeoInterface.Wrappers.Feature{@NamedTuple{geometry::Tuple{Float64, Float64}, val1::Int64, val2::Float32}, Nothing, Nothing}}, Nothing, Nothing}:

SYSTEM (REPL): showing an error caused an error
ERROR: 1-element ExceptionStack:
MethodError: no method matching show(::IOContext{REPL.LimitIO{Base.TTY}}, ::MIME{Symbol("text/plain")}, ::Tuple{Float64, Float64}; show_mz::Bool)
This method does not support all of the given keyword arguments (and may not support any).

Closest candidates are:
  show(::IO, ::MIME{Symbol("text/plain")}, ::Any) got unsupported keyword argument "show_mz"
   @ Base multimedia.jl:47
  show(::IO, ::MIME{Symbol("text/plain")}, ::Core.TypeofBottom) got unsupported keyword argument "show_mz"
   @ Base show.jl:570
  show(::IO, ::MIME{Symbol("text/plain")}, ::Type{GeoFormatTypes.Geom}) got unsupported keyword argument "show_mz"
   @ GeoFormatTypes ~/.julia/packages/GeoFormatTypes/teEG0/src/GeoFormatTypes.jl:40
  ...

Stacktrace:
  [1] show(io::IOContext{…}, ::MIME{…}, f::GeoInterface.Wrappers.Feature{…}; show_mz::Bool)
    @ GeoInterface.Wrappers ~/.julia/packages/GeoInterface/WlhUN/src/wrappers.jl:544
  [2] show(io::IOContext{…}, ::MIME{…}, fc::GeoInterface.Wrappers.FeatureCollection{…})
    @ GeoInterface.Wrappers ~/.julia/packages/GeoInterface/WlhUN/src/wrappers.jl:643
  [3] show_repl(io::IO, mime::MIME{Symbol("text/plain")}, x::Any)
    @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:548
  [4] show_limited(io::IO, mime::MIME, x::Any)
    @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:517
  [5] (::REPL.var"#display##0#display##1"{REPL.REPLDisplay{…}, MIME{…}, Base.RefValue{…}})(io::Any)
    @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:540
  [6] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
    @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:833
  [7] display(d::REPL.REPLDisplay, mime::MIME{Symbol("text/plain")}, x::Any)
    @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:526
  [8] display(d::REPL.REPLDisplay, x::Any)
    @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:546
  [9] display(x::Any)
    @ Base.Multimedia ./multimedia.jl:340
 [10] (::REPL.var"#print_response##2#print_response##3")()
    @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:590
 [11] repl_backend_loop(backend::REPL.REPLBackend, get_module::Function)
    @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:445
 [12] start_repl_backend(backend::REPL.REPLBackend, consumer::Any; get_module::Function)
    @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:427
 [13] start_repl_backend
    @ ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:424 [inlined]
 [14] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool, backend::Any)
    @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:653
 [15] run_repl(repl::REPL.AbstractREPL, consumer::Any)
    @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:639
 [16] run_std_repl(REPL::Module, quiet::Bool, banner::Symbol, history_file::Bool)
    @ Base ./client.jl:478
 [17] run_main_repl(interactive::Bool, quiet::Bool, banner::Symbol, history_file::Bool)
    @ Base ./client.jl:499
 [18] repl_main
    @ ./client.jl:586 [inlined]
 [19] _start()
    @ Base ./client.jl:561
Stacktrace:
 [1] print_response(errio::IO, response::Any, backend::Union{…}, show_value::Bool, have_color::Bool, specialdisplay::Union{…})
   @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:599
 [2] (::REPL.var"#print_response##0#print_response##1"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
   @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:558
 [3] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
   @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:833
 [4] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
   @ REPL ~/.julia/juliaup/julia-1.12.6+
``0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:556
 [5] (::REPL.var"#do_respond#73"{…})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
   @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:1192
 [6] (::VSCodeServer.var"#install_vscode_shell_integration##4#install_vscode_shell_integration##5"{…})(mi::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
   @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.215.2/scripts/packages/VSCodeServer/src/repl.jl:147
 [7] run_interface(terminal::Base.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
   @ REPL.LineEdit ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/LineEdit.jl:2854
 [8] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
   @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:1663
 [9] (::REPL.var"#61#62"{REPL.LineEditREPL, REPL.REPLBackendRef})()
   @ REPL ~/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/share/julia/stdlib/v1.12/REPL/src/REPL.jl:650
Some type information was truncated. Use `show(err)` to see complete types.

Activity

  1. asinghvi17 commented on May 27, 2026

    @asinghvi17
    Member

    Ah, yikes. I guess we should sneak the show_mz into the IOContext instead.

  2. oaksprout commented on Jul 30, 2026

    @oaksprout

    Would you want this one done? — GeoInterface.jl throws a MethodError when displaying a FeatureCollection that wraps a bare-tuple geometry, because an unsupported show_mz keyword is passed down to the nested geometry's show call (#219). If yes, we'll do it and open a PR; if not, say so (or just ignore this) and we won't touch it.

    How it works: an AI agent does the work against your write-up. Before anything reaches you, the change is rebuilt and tested from a clean copy of your project, using your own test suite, and the results are kept in a record you can check yourself. A human reviews it, submits it, and answers the review. You keep full control — nothing lands unless you merge it.

    We're testing whether work offered this way is useful to maintainers — a blunt "no" is as helpful as a yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions