You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
van der Grinten projection (-JV) fails in non -Rg domains #7282
When plotting a global map with the van der Grinten projection (-JV) everything behaves as expected, when using it to plot quadrants or hemispheres things go wild: Instead of quadrants or hemispheres I get modern art.
Full script that generated the error
gmt begin van_der_Grinten_quadrants_hemispheres png
gmt subplot begin 2x4 -Fs8c/16c -M8c/1c -T"van der Grinten quadrant & hemisphere maps"
while read minX maxX minY maxY title
do
gmt subplot set
gmt coast -R${minX}/${maxX}/${minY}/${maxY} -JV0/8c -Bg -Dc -Glightgray -Scornsilk -A10000 -Wthinnest -B+t"${title}"
done << EOF
-180 0 0 90 NW
0 180 0 90 NE
0 180 -90 0 SE
-180 0 -90 0 SW
-180 0 -90 90 W
-180 180 0 90 N
0 180 -90 90 E
-180 180 -90 0 S
EOF
gmt subplot end
gmt end show
If you prefer a one-liner use the following for a plot of the NW quadrant:
Further experimentation confirms that it fails for all projections from the Cookbook 6.4. Miscellaneous projections chapter and also for the Mercator -JM projection.
Removing the forced 0 central longitude from the above script gives correct results. So it is an issue of what that parameters is used for and why it bites so hard.
Activity
KristofKoch commentedon Feb 28, 2023
Additionally similar things happen with the Winkel Tripel projection (
-JR). Maybe related?Trying to plot a western hemisphere:
Central meridian is on the domain border (0°): fail

Central meridian is outside the plot domain (+0.0000001°): fail

Central meridian is inside the plot domain (-0.0000001°): correct

KristofKoch commentedon Feb 28, 2023
Further experimentation confirms that it fails for all projections from the Cookbook 6.4. Miscellaneous projections chapter and also for the Mercator
-JMprojection.Fix incorrect Van Grinten map clip path
PaulWessel commentedon Mar 2, 2023
The pending #7287 appears to fix cases NE, SE, N, E, and S but works is needed for NW, SW and W - all probably related to central meridian issues.
PaulWessel commentedon Mar 2, 2023
Removing the forced 0 central longitude from the above script gives correct results. So it is an issue of what that parameters is used for and why it bites so hard.
Fix incorrect Van Grinten map clip path (#7287)
Let -JV take optional meridian without failure
Let -JV take optional meridian without failure (#7291)
Fix incorrect Van Grinten map clip path (#7287)
Let -JV take optional meridian without failure (#7291)
KristofKoch commentedon Mar 22, 2023
Nice work! Thank you!