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

Can't convert from JSON3 Array (createpolygon should allow for AbstractVector) #361

Open
evetion opened this issue Jan 13, 2023 · 1 comment

Comments

@evetion
Copy link
Collaborator

evetion commented Jan 13, 2023

using ArchGDAL
using GeoJSON
using GeoInterface
g = GeoJSON.read("""
     {
         "type": "Polygon",
         "coordinates": [
             [
                 [100.0, 0.0],
                 [101.0, 0.0],
                 [101.0, 1.0],
                 [100.0, 1.0],
                 [100.0, 0.0]
             ]
         ]
     }""")
GeoInterface.convert(ArchGDAL.IGeometry, g)

MethodError: no method matching createpolygon(::Vector{JSON3.Array})
Closest candidates are:
createpolygon() at ~/.julia/packages/ArchGDAL/pPZyn/src/ogr/geometry.jl:1713
createpolygon(::Val) at ~/.julia/packages/ArchGDAL/pPZyn/src/ogr/geometry.jl:1715
createpolygon(::Vector{<:Real}, ::Vector{<:Real}) at ~/.julia/packages/ArchGDAL/pPZyn/src/ogr/geometry.jl:1756
...

@evetion
Copy link
Collaborator Author

evetion commented Jan 13, 2023

See JuliaGeo/GeoJSON.jl#51

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

1 participant