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

Deprecate the ugly perspective -JG syntax and introduce a modern form #5780

Merged
merged 11 commits into from
Sep 20, 2021

Conversation

PaulWessel
Copy link
Member

While this is backwards compatible, the new form uses optional modifiers. This PR updates the documentation, the example script in the cookbook, but have not changed the test scripts (yet) to make sure both forms work.

New syntax

-Jg|Glon0/lat0/scale|width[+aazimuth][+ttilt][+vvwidth/vheight][+wtwist][+zaltitude]

Old syntax

-Jg|Glon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale|width

I have added three new tests that explores variations in azimuth, altitude, and view window. I will add similar tests for twist and tilt later.
The documentation, doc examples, doc scripts and animations using the perspective projection have been updated to reflect the new syntax. We will leave old tests scripts for backwards testing and add new scripts using the modernized format.

While this is backwards compatible, the new form uses optional modifiers.  This PR updates the documentation, the example script in the cookbook, but have not changed the test scripts (yet) to make sure both forms work.
@PaulWessel PaulWessel added documentation Improve documentation maintenance Boring but important stuff for the core devs labels Sep 18, 2021
@PaulWessel PaulWessel self-assigned this Sep 18, 2021
@PaulWessel PaulWessel changed the title WIP Deprecate the ugly perspective -JG syntax and introduce a modern form Deprecate the ugly perspective -JG syntax and introduce a modern form Sep 18, 2021
@maxrjones maxrjones added add-changelog Add PR to the changelog deprecation Deprecating a feature labels Sep 19, 2021
@PaulWessel
Copy link
Member Author

While @Esteban82 has approved this one (since it works), if anyone has comments or changes to the particular choices of modifiers then now is a good time. FYI, here is the three test results for varying altitude, azimuth, and view restriction:

Altitude:
altitude

Azimuth:
azimuth

View:
view

Copy link
Member

@maxrjones maxrjones left a comment

Choose a reason for hiding this comment

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

New syntax looks nice. I did not test it since that's already been done.

doc/rst/source/cookbook/map-projections.rst Outdated Show resolved Hide resolved
Co-authored-by: Meghan Jones <meghanj@alum.mit.edu>
@PaulWessel PaulWessel merged commit 582b590 into master Sep 20, 2021
@PaulWessel PaulWessel deleted the modern-perspective-syntax branch September 20, 2021 01:43
@Esteban82
Copy link
Member

Is this supposed to work this way? I get a flip image when I add +du to the width

gmt grdimage -JG-73/40/20c+du+z160+a210+t55+v36 -Rg @earth_relief_02m -png Test

Test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add-changelog Add PR to the changelog deprecation Deprecating a feature 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.

3 participants