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

Enable longoptions support for grdproject. #8226

Merged
merged 2 commits into from
Jan 8, 2024
Merged

Conversation

rbdavis
Copy link
Contributor

@rbdavis rbdavis commented Dec 21, 2023

Description of proposed changes

Python differences:

Changed -F scaling to one2one|one2one_scale.

Julia differences:

No differences.

Fixes #

Reminders

  • Make sure that your code follows our style. Use the other functions/files as a basis.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Describe changes to function behavior and arguments in a comment below the function declaration.
  • If adding new functionality, add a detailed description to the documentation and/or an example.

@rbdavis rbdavis requested a review from a team December 21, 2023 01:56
"", "",
{ 0, 'E', "dpi", "", "", "", "", GMT_TP_STANDARD },
{ 0, 'F', "one2one|one2one_scale",
"c,i,p,e,f,k,M,n,u", "cm,inch,point,meter,foot,km,smile,nmile,ussft",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be very late in the game to ask, but I think we should be more flexible here, since it would be easy to forget the exact syntax. Can we do something like:
"cm,inch|in,point|pt,meter|m,foot|ft,km,smile|mi,nmile|nm,ussft"

I'm not sure that a single letter "m" would work. To be checked.
Also this should then be used consistently in other modules.

GMT_G_OUTGRID_KW,
{ 0, 'I', "inverse", "", "", "", "", GMT_TP_STANDARD },
{ 0, 'M', "unit|projected_unit",
"c,i,p", "cm,inch,point",
Copy link
Contributor

@remkos remkos Dec 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the above: could we do "cm,inch|in,point|pt"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if we want distance units to be spelled out. That would mean hundred of places where we should allow km for k, point for p, etc, Think of map projections, e.g. Jm72point. I think it is cleaner that people need to know what the unit abbreviations are instead of having to deal with smile and foot. I think the most commonly used units will be c, i, p, m, k. Doubt anyone uses USGS survey foot. Mariners may use nautical miles.
However, I am happy to hear what more people think of this. Seems like unnecessary and much work to mel @joa-quim?, @seisman ?, @leouieda , @Esteban82 ?

@joa-quim
Copy link
Member

Agree with no long names here. 250smile may look modern but is wrong (should be plural)

@PaulWessel
Copy link
Member

Agree with no long names here. 250smile may look modern but is wrong (should be plural)

Tru for all of them, then: kms. Gets crazy as in science nobody would use plural unless spelling kilometers. They may write km in sentences but we dont want to go there. c,i,p,m,k,n,M,f,u is fine,

@remkos
Copy link
Contributor

remkos commented Dec 21, 2023

I was not intending to create such a big thing. But it is true that it would be confusing, since we stick to c,i,p etc. for units (as in -W1p,blue) but then use the units written out here in grdproject

So I agree with the consensus among @PaulWessel and @joa-quim to use "c,i,p,m,k,M,n,f,u " and "c,i,p" resp.

@rbdavis rbdavis merged commit b458c52 into master Jan 8, 2024
6 checks passed
@rbdavis rbdavis deleted the longopts-grdproject branch January 8, 2024 21:22
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

Successfully merging this pull request may close these issues.

None yet

4 participants