-
Notifications
You must be signed in to change notification settings - Fork 28
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
distance(x,x) fails #974
Comments
Hmm, this simple case works for we with the master version
Does it work for you? Could you please try the GMT.jl master version? |
Master works. Thanks. |
Actually, running > buffergeo(g, width=100, unit=:km)
ERROR: UndefVarError: result not defined
Stacktrace:
[1] setgeom!(feature::GMT.Gdal.Feature, geom::GMT.Gdal.IGeometry)
@ GMT.Gdal ~/.julia/packages/GMT/CRO4V/src/gdal.jl:855
[2] gmt2gd(D::Vector{GMTdataset{Float64, 2}}; save::String, geometry::String)
@ GMT ~/.julia/packages/GMT/CRO4V/src/gdal_utils.jl:408
[3] #gmt2gd#558
@ ~/.julia/packages/GMT/CRO4V/src/gdal_utils.jl:355 [inlined]
[4] gmt2gd(D::Matrix{Float64}; save::String, geometry::String)
@ GMT ~/.julia/packages/GMT/CRO4V/src/gdal_utils.jl:354
[5] gmt2gd
@ ~/.julia/packages/GMT/CRO4V/src/gdal_utils.jl:354 [inlined]
[6] helper_2geoms(D1::Matrix{Float64}, D2::Matrix{Float64})
@ GMT.Gdal ~/.julia/packages/GMT/CRO4V/src/gdal_extensions.jl:561
[7] helper_geoms_run_fun(f::typeof(polyunion), D1::Matrix{Float64}, D2::Matrix{Float64}, retds::Bool; gdataset::Bool)
@ GMT.Gdal ~/.julia/packages/GMT/CRO4V/src/gdal_extensions.jl:541
[8] #polyunion#96
@ ~/.julia/packages/GMT/CRO4V/src/gdal_extensions.jl:139 [inlined]
[9] polyunion(D1::Matrix{Float64}, D2::Matrix{Float64})
@ GMT.Gdal ~/.julia/packages/GMT/CRO4V/src/gdal_extensions.jl:139
[10] buffergeo(line::Matrix{Float64}; width::Int64, unit::Symbol, np::Int64, flatstart::Bool, flatend::Bool, proj::String, epsg::Int64, tol::Float64)
@ GMT ~/.julia/packages/GMT/CRO4V/src/proj_utils.jl:269
[11] buffergeo(D::Vector{GMTdataset}; width::Int64, unit::Symbol, np::Int64, flatstart::Bool, flatend::Bool, epsg::Int64, tol::Float64)
@ GMT ~/.julia/packages/GMT/CRO4V/src/proj_utils.jl:247
[12] top-level scope |
Pkg.jl failed to install GMT.jl originally so I installed GMT at the system level through my OS. |
No problem, that is fine, but the error is coming from apparently old GMT.jl files. There is no (will try to look better at this later, have visitors by now) |
Have you managed to solve this issue? |
Thanks, no, I got what I needed in Geopandas. I don't need it anymore. |
I'm trying again and got an error. julia> versioninfo()
Julia Version 1.8.1
Commit afb6c60d69a (2022-09-06 15:09 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 24 × AMD Ryzen 9 3900XT 12-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, znver2)
Threads: 12 on 24 virtual cores
Environment:
LD_LIBRARY_PATH = /nix/store/d3wmyhdwm8dcngil7zibbcxn01lgbd2y-R-4.1.2/lib/R/lib
JULIA_NUM_THREADS = 12
JULIA_EDITOR = code
(v1.5) pkg> st GMT
[5752ebe1] GMT v0.43.0
julia> distance(zcta[1],zcta[1])
ERROR 10: Pointer 'hDriver' is NULL in 'GDALCreate'.
ERROR 10: Pointer 'hDS' is NULL in 'GDALDatasetCreateLayer'.
ERROR 10: Pointer 'hLayer' is NULL in 'OGR_L_GetLayerDefn'.
ERROR 10: Pointer 'hDefn' is NULL in 'OGR_F_Create'.
ERROR 10: Pointer 'hFeat' is NULL in 'OGR_F_SetGeometry'.
ERROR: UndefVarError: result not defined
Stacktrace:
[1] setgeom!(feature::GMT.Gdal.Feature, geom::GMT.Gdal.IGeometry)
@ GMT.Gdal ~/.julia/packages/GMT/5iuho/src/gdal.jl:855
[2] gmt2gd(D::Vector{GMTdataset{Float64, 2}}; save::String, geometry::String)
@ GMT ~/.julia/packages/GMT/5iuho/src/gdal_utils.jl:408
[3] #gmt2gd#578
@ ~/.julia/packages/GMT/5iuho/src/gdal_utils.jl:355 [inlined]
[4] gmt2gd
@ ~/.julia/packages/GMT/5iuho/src/gdal_utils.jl:355 [inlined]
[5] helper_2geoms(D1::GMTdataset{Float64, 2}, D2::GMTdataset{Float64, 2})
@ GMT.Gdal ~/.julia/packages/GMT/5iuho/src/gdal_extensions.jl:561
[6] #helper_geoms_run_fun#108
@ ~/.julia/packages/GMT/5iuho/src/gdal_extensions.jl:541 [inlined]
[7] helper_geoms_run_fun
@ ~/.julia/packages/GMT/5iuho/src/gdal_extensions.jl:538 [inlined]
[8] distance(D1::GMTdataset{Float64, 2}, D2::GMTdataset{Float64, 2})
@ GMT.Gdal ~/.julia/packages/GMT/5iuho/src/gdal_extensions.jl:187
|
Can't get it. This is what I get on Linux too
Does it error for you too? How did you install your GMT? Specially GDAL. |
GMT.jl was installed normally with Pkg. GMT 6.2.0 itself was installed via NixOS 21.11. julia> using GMT
julia> distance(mat2ds([0 1]), mat2ds([0 1]))
0.0 |
Ah, so please provide a full failing example (with the data used) so that I can investigate. |
The code is just using GMT
zcta = gmtread("cb_2017_us_zcta510_500k.shp")
distance(zcta[1],zcta[1]) The data is here. |
Still can't reproduce the error.
But something is still not right. Your error message says
but if you open the
and not a call to |
Closing this as non-reproducible. Please reopen if any news. |
I got this error on GMT.jl v0.42.4
The text was updated successfully, but these errors were encountered: