Let -JV take optional meridian without failure#7291
Conversation
Well, at least the original troubles reported in #7282 are fixed. The final issue appreas to have been that when the region was negative we shifted it in coast by 360 but unfortunately the check for doing th4 same to the central meridian nad < instead of <= so it was left behind to cause chaos, I added another test pscoast_JV_set.sh which uses a fixed Greenwhich as the central meridian and those quadrants and hemispheres now work.
|
If I change the projection from V to R, N, K, H, W etc they all work it seems |
|
Yep. Nothing is foolproof yet but let me know if basemap does the same or if it is a coast thing. |
|
Yes, |
|
So, what is happening here is that if you set a central meridian at lon = 1, then the most western longitude on a global map is lon = -179 since then the distance from central meridian to west is 180 degrees. Setting it to -180 is actually a point on the east end and GMT goes nuts. For instance, if I modify your example slightly along these lines: gmt coast -R-179/2/-90/90 -JR1/12c -Bg -W0.5 -png lixo then we get So I think these failures should be caught with a check that says
|
|
Just noticing that for most of the cylindrical projections, we have a check that override bogus things like this and recenter the central longitude in the middle. If I add the same call (gmtmap_cyl_validate_clon) to gmtmap_init_winkel then you sample yields with central longitude forced to be half-way from w to e. Given this has been the default action in Mercator, Cylindrical Equal-Area, Cylindrical Equidistance, Miller, Cylindrical Stereographic, I guess some options are:
Thoughts? |
Well, at least the original troubles reported in #7282 are fixed. The final issue appreas to have been that when the region was negative we shifted it in coast by 360 but unfortunately the check for doing th4 same to the central meridian nad < instead of <= so it was left behind to cause chaos, I added another test pscoast_JV_set.sh which uses a fixed Greenwhich as the central meridian and those quadrants and hemispheres now work.



Well, at least the original troubles reported in #7282 are fixed. The final issue appreas to have been that when the region was negative we shifted it in coast by 360 but unfortunately the check for doing the same to the central meridian had
<instead of<=so it was left behind to cause chaos, I added another test pscoast_JV_set.sh which uses a fixed Greenwich as the central meridian and those quadrants and hemispheres now work: