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
When layer = ArchGDAL.getlayer(dataset, 0) is called in a single-line Pluto cell (or at the end of a multi-line Pluto cell), the following error is thrown:
Failed to show value:
MethodError: no method matching length(::ArchGDAL.Feature)
Closest candidates are:
length(!Matched::Union{Base.KeySet, Base.ValueIterator}) at /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/base/abstractdict.jl:58
length(!Matched::Union{Tables.AbstractColumns, Tables.AbstractRow}) at ~/.julia/packages/Tables/M26tI/src/Tables.jl:175
length(!Matched::Union{DataStructures.OrderedRobinDict, DataStructures.RobinDict}) at ~/.julia/packages/DataStructures/vSp4s/src/ordered_robin_dict.jl:86
...
1. table_data(::ArchGDAL.IFeatureLayer, ::IOContext{IOBuffer})@PlutoRunner.jl:1359
2. show_richest(::IOContext{IOBuffer}, ::Any)@PlutoRunner.jl:1004
3. var"#sprint_withreturned#54"(::IOContext{Base.DevNull}, ::Int64, ::typeof(Main.PlutoRunner.sprint_withreturned), ::Function, ::ArchGDAL.IFeatureLayer)@PlutoRunner.jl:954
4. format_output_default(::Any, ::Any)@PlutoRunner.jl:862
5. var"#format_output#42"(::IOContext{Base.DevNull}, ::typeof(Main.PlutoRunner.format_output), ::Any)@PlutoRunner.jl:879
6. formatted_result_of(::Base.UUID, ::Bool, ::Vector{String}, ::Nothing, ::Module)@PlutoRunner.jl:785
7. top-level scope@none:1
Looks like a new method for length should be created, or perhaps the returned value type ought to be changed.
As pointed out by @felixcremer on the Slack channel, this error can be worked around with layer |> DisplayAs.Text. Otherwise, the output can be suppressed entirely with ;.
The text was updated successfully, but these errors were encountered:
Thank you for filing this; as a feature has both fields and geometries, it is unclear what the "length" of a feature should correspond to, and what it means to be iterating over it, so I'm not ready to support it yet -- happy to have a discussion around it if that's helpful
When
layer = ArchGDAL.getlayer(dataset, 0)
is called in a single-line Pluto cell (or at the end of a multi-line Pluto cell), the following error is thrown:Looks like a new method for
length
should be created, or perhaps the returned value type ought to be changed.Related: JuliaGeo/Shapefile.jl#50
As pointed out by @felixcremer on the Slack channel, this error can be worked around with
layer |> DisplayAs.Text
. Otherwise, the output can be suppressed entirely with;
.The text was updated successfully, but these errors were encountered: