Skip to content

Can't plot geometry wrapper types #110

@evetion

Description

@evetion
julia> using GeoInterface, Plots, GeoFormatTypes

julia> points = GeoInterface.Point.(rand(10),rand(10), crs=GeoFormatTypes.EPSG(4326))
10-element Vector{GeoInterface.Wrappers.Point{false, false, Tuple{Float64, Float64}, EPSG}}:
 GeoInterface.Wrappers.Point{false, false, Tuple{Float64, Float64}, EPSG}((0.6569792502348218, 0.5196554284209661), EPSG(4326))
...

julia> plot(points)
ERROR: Cannot convert GeoInterface.Wrappers.Point{false, false, Tuple{Float64, Float64}, EPSG} to series data for plotting
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] _prepare_series_data(x::GeoInterface.Wrappers.Point{false, false, Tuple{Float64, Float64}, EPSG})
    @ RecipesPipeline ~/.julia/packages/RecipesPipeline/BGM3l/src/series.jl:8
  [3] _series_data_vector(x::GeoInterface.Wrappers.Point{false, false, Tuple{Float64, Float64}, EPSG}, plotattributes::Dict{Symbol, Any})
    @ RecipesPipeline ~/.julia/packages/RecipesPipeline/BGM3l/src/series.jl:36
  [4] (::RecipesPipeline.var"#21#24"{Dict{Symbol, Any}})(vi::GeoInterface.Wrappers.Point{false, false, Tuple{Float64, Float64}, EPSG})
    @ RecipesPipeline ./none:0
  [5] iterate
    @ ./generator.jl:47 [inlined]
  [6] _series_data_vector(v::Vector{GeoInterface.Wrappers.Point{false, false, Tuple{Float64, Float64}, EPSG}}, plotattributes::Dict{Symbol, Any})
    @ RecipesPipeline ~/.julia/packages/RecipesPipeline/BGM3l/src/series.jl:51
  [7] macro expansion
    @ ~/.julia/packages/RecipesPipeline/BGM3l/src/series.jl:129 [inlined]
  [8] apply_recipe(plotattributes::AbstractDict{Symbol, Any}, #unused#::Type{RecipesPipeline.SliceIt}, x::Any, y::Any, z::Any)
    @ RecipesPipeline ~/.julia/packages/RecipesBase/BRe07/src/RecipesBase.jl:300
  [9] _process_userrecipes!(plt::Any, plotattributes::Any, args::Any)
    @ RecipesPipeline ~/.julia/packages/RecipesPipeline/BGM3l/src/user_recipe.jl:38
 [10] recipe_pipeline!(plt::Any, plotattributes::Any, args::Any)
    @ RecipesPipeline ~/.julia/packages/RecipesPipeline/BGM3l/src/RecipesPipeline.jl:72
 [11] _plot!(plt::Plots.Plot, plotattributes::Any, args::Any)
    @ Plots ~/.julia/packages/Plots/3BCH5/src/plot.jl:223
 [12] #plot#188
    @ ~/.julia/packages/Plots/3BCH5/src/plot.jl:102 [inlined]
 [13] plot(args::Any)
    @ Plots ~/.julia/packages/Plots/3BCH5/src/plot.jl:93
 [14] top-level scope
    @ REPL[10]:1

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