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

gmtread not reading .json files #693

Closed
adigitoleo opened this issue Sep 13, 2021 · 5 comments
Closed

gmtread not reading .json files #693

adigitoleo opened this issue Sep 13, 2021 · 5 comments

Comments

@adigitoleo
Copy link

adigitoleo commented Sep 13, 2021

I'm getting a MethodError from GMTdataset when reading .json files (GeoJSON data). It happens regardless of ogr=true. I haven't had time to debug it yet but here is the trace:

ERROR: MethodError: no method matching GMTdataset(::Matrix{Float64}, ::Vector{String}, ::SubString{String}, ::Vector{String}, ::String, ::String, ::UInt32)
Closest candidates are:
  GMTdataset(::Array{T, N}, ::Vector{String}, ::String, ::Vector{String}, ::String, ::String, ::Integer) where {T<:Real, N} at /home/admin/.julia/packages/GMT/cliKV/src/gmt_main.jl:101
  GMTdataset(::Matrix{Float64}, ::Vector{String}) at /home/admin/.julia/packages/GMT/cliKV/src/gmt_main.jl:120
  GMTdataset(::Matrix{Float32}, ::Vector{String}) at /home/admin/.julia/packages/GMT/cliKV/src/gmt_main.jl:123
  ...
Stacktrace:
 [1] ogr2GMTdataset(in::Ptr{GMT.OGR_FEATURES}, drop_islands::Bool)
   @ GMT ~/.julia/packages/GMT/cliKV/src/gmt_main.jl:1261
 [2] ogr2GMTdataset
   @ ~/.julia/packages/GMT/cliKV/src/gmt_main.jl:1230 [inlined]
 [3] gmtread(fname::String; kwargs::Base.Iterators.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:ogr,), Tuple{Bool}}})
   @ GMT ~/.julia/packages/GMT/cliKV/src/gmtreadwrite.jl:151
 [4] top-level scope
   @ REPL[2]:1

GeoJSON datafile.

julia> versioninfo()
Julia Version 1.6.2
Commit 1b93d53fc4* (2021-07-14 15:36 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)

julia> GMT.GMTbyConda
false

shell> gmt --version
6.1.1
@joa-quim
Copy link
Member

What is the GMT.jl version? (Type ] st GMT)

@adigitoleo
Copy link
Author

[5752ebe1] GMT v0.36.1

@joa-quim
Copy link
Member

Ah, that is probably something I fixed recently. The problem is that SubString{String} in 3rd argument. It should be a String. Please try the #master branch (] add GMT#master)

@adigitoleo
Copy link
Author

adigitoleo commented Sep 13, 2021

@joa-quim
Copy link
Member

joa-quim commented Sep 13, 2021

Nice. I'll tag another version soon but I would like first to finish (though nothing never finishes) the GADM work in master.

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

2 participants