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

Remove deprecated doc and usage language from grdview #8302

Merged
merged 5 commits into from
Jan 17, 2024

Conversation

PaulWessel
Copy link
Member

There is no need to explain about the deprecated way of specifying 3 grids to drap (red, green blue) since we stopped doing that for grdimage a long time ago. grdview will still check if given 3 but we don't have to talk about it. The usage and docs now deal with -Gdrapegrid|drapeimage only. We have a script that exercises the deprecated forms -Gr.nc,g.nc,b.nc and -Gr.nc -Gg.nc -Gb.nc and that works fine under the hood without any advertisement.

I left the special option -z for passing a single image from GMT.jl. Suggest @joa-quim play with removing that. Since the KEY need G or I perhaps some work needs to be done in GMT_Encode_Options?

Improved the doc layout for -G and -Q as well as their synopsis.

Here is -G:

G

Here is -Q:

Q

All tests pass so I think this is mostly a documentation PR.

There is no need to explain about the deprecated way of specifying 3 grids to drap (red, green blue) since we stopped doing that for grdimage a long time ago.  grdview will still check if given 3 but we dont have to talk about it.  The usage and docs now deal with -Gdrapegrid|drapeimage only.
@PaulWessel PaulWessel added documentation Improve documentation maintenance Boring but important stuff for the core devs labels Jan 17, 2024
@PaulWessel PaulWessel added this to the 6.6.0 milestone Jan 17, 2024
@PaulWessel PaulWessel self-assigned this Jan 17, 2024
@joa-quim
Copy link
Member

Not sure you can drop the case z: like that. grdview has a KEY zI(, but no equivalent GI(,

@PaulWessel
Copy link
Member Author

Yes, saw that so leave for now. Solution is to learn in GMT_Encode_Option that the virtual single file is an image, and then change type from ? to I or G.
But grdimage also accept image or grid and it just does <G{ and never sees an I even though we detect that in the code, no?

@joa-quim
Copy link
Member

Yep, that magic is apparently working. I have this Julia test

I = mat2img(rand(UInt8,89,120,3), proj4="+proj=longlat +datum=WGS84 +no_defs");
grdview(rand(90,120), G=I, J=:X12, JZ=5, Q=:i, view="145/30", show=1)

and a bunch of colored random noise draped on a random grid does show up and looks good. So that -z is probably not needed after all.

@PaulWessel
Copy link
Member Author

PaulWessel commented Jan 17, 2024

Try to remove the z KEY and the case 'z': in this PR and see if all is well.

@joa-quim
Copy link
Member

Removing the z and its KEY as well as replacing zI( by GI(, all made no difference. The colored trash test still works fine.

@PaulWessel
Copy link
Member Author

OK, did you commit this to the PR so we can approve merge etc?

@joa-quim
Copy link
Member

Did commit now. Also replaced the KEY though it's probably not being used.

@PaulWessel PaulWessel merged commit ebf8b2f into master Jan 17, 2024
6 checks passed
@PaulWessel PaulWessel deleted the grdview-doc-update branch January 17, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improve documentation maintenance Boring but important stuff for the core devs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants