GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — Add two -R shorthands for projected coordinates by PaulWessel · Pull Request #6094 · GenericMappingTools/gmt Conversation
Contributor
Description of proposed changes This PR is in response to #6090 and introduces two short-hand forms of the general projected region set via -Rxmin/xmax/ymin/ymax[+uunit]:
Note: For these shorthands the +u modifier is required. Below is a short test result added as part of PR: Closes #6090.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsSee feature request #6090.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Radius seems like a misnomer here to me. Why not use -Rhalfwidth[/halfheight][+uunit] where halfheight defaults to halfwidth if not given?
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
If not entered then you do standard stuff like -R-600/200/-100/300+uk etc. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I approved because I got the maps from the test right. I didn't revise the docs.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I don't know how to unlike my own comment... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I find this option confuse. Many projections do not use a latitude parameter (that is lat_0 = 0). So this means the rectangle will always have to be around the equator, no? In fact I had a similar idea for the Julia wrapper but always gave up because I could never remember what -Rx was supposed to mean. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I think even Mercator optionally takes that latitude, but it is not universal and for many it would mean Equator. The key use of this is to make lots of maps that all are centered on various locations and have the same dimensions - one would never want to use the Eckert project for this, for example (well, maybe your new Lester would). I do this all the time and this is just a logical simplification. Way more useful than the one we added for Kurt Feigl in 2016... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
BTW @meghanrjones I switched the syntax and docs to your suggestion. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Ah, a bash-lovers short circuit thing ... still one not working for Mercator (and cousins) in other then around the equator. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
In other words there is room for improvement in our -J settings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
But not to please this option (ofc there is the proj4 string syntax, etc) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
yes. I am waiting for Leo to respond to my change of refactoring before we schedule a chat focused on C refactoring things, such as pro, but no word yet - busy times. I also do not want to have that chat and then have 3 weeks of holiday delay any actual action. So maybe we have that chat in early January anyway. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry but I still think this is not a good solution. If I got it right this is for when one want to make a map with a certain Cartesian width centered in some point. As implemented the center point is the projection center that, as mentioned above, for may projections lies on the equator only. So this option works only sometimes. And why would we force the map center to be on the projection center? A better way would be to set |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Perhaps we can consider a +clon0/lat0 modifier to set a specific center projection point, with the default being the projection origin. That way, the users of projections that has a specific point (azimuthal for instance) can accept the default (as currently encoded) while others can use +c. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Better to leave the +c clean as we do with +r -Rx[/y]+c => use projection center |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Requiring +c breaks backwards compatibility for the cases that have been used forever like this. Also, we do not have modifiers that take its arguments before the modifier, but I understand what you mean "+c means the last two args are center coordinates, not projected distances". I will think more about this. We do not want backwards incompatibilities in -R. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm using +c like we use +r. Why would it break compatibility? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, it would not. No coffee yet, no breakfast, you expecting me to engage in a technical conversation this early? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hawaiian chickens are well awaken already and for quite some time now. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Here is the backwards issue I was thinking of. This currently works great (i.e., before we even merged this branch:
(This is the long-version of the first plot in the test above). As you see, it requires no +c to set the central point to 204/21 since that is set via -J. This has worked for a decade at least, so we do not want toads a +c as a requirement for it to continue to work. So the +c has to be optional I think. I do not think
would be a useful syntax as now the savings are gone. I also think the azimuthal projections are the ones where this is most useful but of course that is user-dependent. Hence, I think +c needs to be +clon0/lat0 with default to the projection center. This may be at Equator for many/most projections. So, a Mercator version of the above might be
I think your suggestion -Rhalfwidth[/halfheight][/lon0/lat0+c]+uunit could work but I do think passing those arguments to +c is a better implementation in line with most situations in GMT. So in summary, the shortcut was introduced because making such a square/rectangle centered on the azimuthal touch point can so easily be done this way, but I agree that for non-azimuthal and non-conic projections there would have to be more. We could accommodate this for those projections via optional latitudes, i.e. -JH[lon0[/lat0]/]width where the lat0 has no affect on the projection but lets us compute the (x,y) projected units of the center point and now we can do relative measurements from there. It is mostly those global projections plus some cylindrical that would need this info and then that is the logical way to set the projection center (in -J rather than in -R). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
but it would not be
That is the part that I'm against. We should not change the -J syntax (with no parallel in proj4) just to please -R |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
OK, so we would know for -JA,S,G etc that we already have a valid default point so -R300+un+c is understandable. That means the syntax is actually [/lon0/lat0]+c then? What do you do with
then? Do we really want to parse that and somehow figure out that -150/75 can't be lon/lat since the halfwidth is negative, etc, etc? I can imagine cases where there is just no way to know. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
without +c the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Well, the point is that the above ( |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
(Speaking of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
50568cb7
Deployed
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Improve -Rxmin/xmax/ymin/ymax+uunit
There was an error while loading. Please reload this page.