-
Notifications
You must be signed in to change notification settings - Fork 398
Add -Wo to mapproject for oblique domain in degrees #6474
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
Conversation
It is useful to scripters to learn whhat the equivalent -R setting in degrees might be if one specifies an oblique region via -Rxmin/xmax/ymin/ymax+uunit. This PR adds that capability via -Wo.
joa-quim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this mixes numeric and text outputs, maybe split split this option in -Wo for numeric only and -WO for the string only (e.g. "-R....")?
|
Yes, good idea. Will fix. |
|
Is it necessary to have another one or two modifiers for this feature or could the case of an oblique region via -Rxmin/xmax/ymin/ymax+uunit be automatically detected when using -WR or -Wr as an enhancement to #5782? |
|
Avoiding new modifiers is even better. |
|
Well, those are two different things though.
They are not the same thing, so even thought I can know internally you used +u I dont want to report one of two different things. |
|
Done. Example is now
since -F and -C do not enter anyway (set by +u). |
|
Given map, e.g. I would like to find out lon/lat box that contains the oblique region (very related to #3099), hence I should use But not sure this works with lat/long? How would I find the box (in lat/long) containing the oblique region? |
|
I must not understand what you mean. Your example is not an oblique projection and the region is the one you are giving it. I.e, a grid for -10/20/60/70 should fill your map, no? |
|
Sorry to be unclear. I must educate myself on this. I thought the -JS-projection was oblique… The essence, though, in my question is; given an -R (with -JS in this case) what are the coordinates of the rectangular box that contains this ‘pie slice’ (i.e. -R[..]r). This is the wrong place to ask question; sorry. |
|
Hm, I see what you mean. When we say "oblique" in this context we mean a projection whose borders are not meridians and parallels. In that sense, your -JS is not oblique, while -JO etc are. Your pie slice is only "oblique" in the sense it is not a projected rectangle, but what that rectangle you talk about is depends on some other projection, no? |
|
I’m in deep water here; I’m not familiar enough with projections to use correct wording. My point is maybe clearer in this post; #3099 (comment). The ‘rectangle’ I’m talking about is basically the frame created by gmt. Thanks for answering, and sorry for misunderstanding! PS! Your description of ‘oblique’ was very enlightening; is this the common way to describe ‘obliqueness’? |
|
No worries. |
|
I got an epiphany this morning; my question here, as well as in #3099, has basically been how to go from a pie slice ( Given I.e.: Thanks for all help! |
It is useful to scripters to learn what the equivalent -R setting in degrees might be if one specifies an oblique region via -Rxmin/xmax/ymin/ymax+uunit. This PR adds that capability via -Wo which will write the w e s n numbers plus -Rstring as trailing text. Example:
or
Rstring=$(gmt mapproject -R-2800/2400/-570/630+uk -Joc190/25/266/68/1:1 -Fk -C -Wo -ot)No tests are affected. Man page updated to show such an example.