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
using Shapefile, GLMakie
shp = Shapefile.Table("hyd1_4l.shp") # river polylinesbegin
fig =Figure()
ax =Axis(fig[1, 1])
lines!.(ax, shp.geometry) # worklines!(ax, shp) # not works
fig
end
This problem might root in the _convert_array_arguments function.
But not sure whether it is the problem of GeoInterfaceMakie or Makie.
Adding a new interface for AbstractVector{<:MultiLineString{N,T}} solved this issue.
import Makie: convert_arguments
functionconvert_arguments(PB::PointBased, linestring::AbstractVector{<:MultiLineString{N,T}}) where {N,T}
T_out =float_type(T)
arr = Point{N,T_out}[]
n =length(linestring)
for idx in1:n
append!(arr, convert_arguments(PB, linestring[idx])[1])
if idx != n # don't add NaN at the end push!(arr, Point{N,T_out}(NaN))
endendreturn (arr,)
end
hyd1_4l.shp
is available at hyd1_4l.ziplines!(ax, shp)
gives the error:The text was updated successfully, but these errors were encountered: