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
gmt makecpt -Cred,green,blue -T0,100,200,450
0 red 100 red L
100 green 200 green L
200 blue 450 blue B
B black
F white
N 128
(base) pwessel@MacAttack-> gmt makecpt -Cred,green,blue -T0,100,200,451
0 red 100 red L
100 green 200 green L
200 blue 451 blue B
B black
F white
N 128
OK, looking at this but following debug instructions. using GMT gives
using GMT
ERROR: InitError: could not load library "/opt/local/lib/libgdal.30.dylib"
dlopen(/opt/local/lib/libgdal.30.dylib, 0x0001): tried: '/opt/local/lib/libgdal.30.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/local/lib/libgdal.30.dylib' (no such file), '/opt/local/lib/libgdal.30.dylib' (no such file)
Stacktrace:
[1] GDALVersionInfo(a1::String)
@ GMT.Gdal ~/.julia/packages/GMT/qpeq8/src/gdal.jl:331
[2] __init__()
@ GMT.Gdal ~/.julia/packages/GMT/qpeq8/src/gdal.jl:2457
[3] _include_from_serialized(path::String, depmods::Vector{Any})
@ Base ./loading.jl:768
[4] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
@ Base ./loading.jl:854
[5] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1097
[6] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:1013
[7] require(into::Module, mod::Symbol)
@ Base ./loading.jl:997
during initialization of module Gdal
Things have changed in GMT.jl land in that we now use a pre-build GMT (remember that paper that I ever finish) and the local GMT installs are now ignored, but you should not have had that error. The fix should come from doing import Pkg; Pkg.build("GMT")
but that will not allow you to do debugging, only normal use. To use a GMT local build, and hence follow the old debug instructions, please try what is explained in https://github.com/GenericMappingTools/GMT.jl#install
Not 100% sure it will work. It did on Linux when I invented that but never tried Mac ans specially with a debug build.
Ah, and don't forget to do a ] up before all the rest.
All Julia commands must be run from the Julia shell.
But you should have got an error when running the ] up (to update), which must all be done in the Julia shell.
Ah, I see. Hit the backspace key to bring you back to the julia> prompt and than run those commands. When we type ] we are sent to the Pkg mode and probably running build("GMT") would work too, but never tried that way.
Not sure, but the CLI -T is a list argument while yours is a -Tmemory file argument. Some bool probably different between the wo cases. If I do the same with a text file -Tt.txt which has those 4 values I get the same as you. So the differences lies in the parsing of the list vs reading a file.
Problem seems to be this: You are giving a list of values which we usually flag via -Ta,b,c,d i.e., comma-separated list. This sets T->list = true somewhere. However, when you pass a data file there is no information that says "treat this as a list". It is seen as a regular file with uneven increments and we end up resampling it evenly on the output, thus getting wrong colours.
You can see in gmt_sample_cpt that we linearly select output nodes and not the 0, 100, 200, 451 as the list would have done. Not sure what a good solution is here. Maybe we have to introduce another MODE flag that would accompany your data set as segment header and it would flag "this is a list" not a data set" or something?
Activity
PaulWessel commentedon Jun 20, 2023
So CLI has it right:
Gotta be something in GMT.jl?
joa-quim commentedon Jun 20, 2023
CLI passes a string, not an array. That works fine in GMT.jl too
PaulWessel commentedon Jun 21, 2023
OK, looking at this but following debug instructions. using GMT gives
using GMT
My GDAL works find for me?
PaulWessel commentedon Jun 21, 2023
I have libgdal.33.dylib - where is the 30 coming from?
joa-quim commentedon Jun 21, 2023
Things have changed in GMT.jl land in that we now use a pre-build GMT (remember that paper that I ever finish) and the local GMT installs are now ignored, but you should not have had that error. The fix should come from doing
import Pkg; Pkg.build("GMT")but that will not allow you to do debugging, only normal use. To use a GMT local build, and hence follow the old debug instructions, please try what is explained in https://github.com/GenericMappingTools/GMT.jl#install
Not 100% sure it will work. It did on Linux when I invented that but never tried Mac ans specially with a debug build.
Ah, and don't forget to do a
] upbefore all the rest.PaulWessel commentedon Jun 21, 2023
You gotta be more precise with us who do not use Julia:
import Pkg
ERROR: Could not determine command
joa-quim commentedon Jun 21, 2023
All Julia commands must be run from the Julia shell.
But you should have got an error when running the
] up(to update), which must all be done in the Julia shell.PaulWessel commentedon Jun 21, 2023
joa-quim commentedon Jun 21, 2023
Ah, I see. Hit the backspace key to bring you back to the
julia>prompt and than run those commands. When we type]we are sent to the Pkg mode and probably runningbuild("GMT")would work too, but never tried that way.PaulWessel commentedon Jun 21, 2023
Not sure, but the CLI -T is a list argument while yours is a -Tmemory file argument. Some bool probably different between the wo cases. If I do the same with a text file -Tt.txt which has those 4 values I get the same as you. So the differences lies in the parsing of the list vs reading a file.
PaulWessel commentedon Jun 23, 2023
Problem seems to be this: You are giving a list of values which we usually flag via -Ta,b,c,d i.e., comma-separated list. This sets T->list = true somewhere. However, when you pass a data file there is no information that says "treat this as a list". It is seen as a regular file with uneven increments and we end up resampling it evenly on the output, thus getting wrong colours.
You can see in gmt_sample_cpt that we linearly select output nodes and not the 0, 100, 200, 451 as the list would have done. Not sure what a good solution is here. Maybe we have to introduce another MODE flag that would accompany your data set as segment header and it would flag "this is a list" not a data set" or something?
Mechanism for passing -Tlist via a file
Mechanism for passing -Tlist via a file (#7569)