Skip to content

GMT6: incorrect regions when plotting using EPSG:3031 (Antarctic Polar Stereographic) #6938

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

Open
smudog opened this issue Aug 6, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@smudog
Copy link

smudog commented Aug 6, 2022

Description of the problem
I have been trying to plot - first with pygmt and then with gmt6.4 antarctic data projected in EPSG:3031 (south polar stereographic with true scale at 71 south) and lat long data, and finding that when plotting using the epgs flag, the region plotted is not aligned with the region commanded, resulting in misalignment. This appears to work fine when using the "S" original syntax. Below shows the epsg output, -Js and -JS output, and green dots showing the corner coordinates used to define the region. Note that the true scale at 71 south is not a linear scaling, but is a non-linear deformation compared to true scale at 90.

Might be related to issue #4352.

Full script that generated the error

!/bin/bash

trap 'echo $LINENO; exit' ERR 

X1=122.62152014692141
X2=109.40195764826689
Y1=-66.89884214580835
Y2=-65.03587792781053

outfile=stereo_test.ps

REGION=-R$X1/$Y1/$X2/$Y2+r

proj="epsg:3031/5c"
gmt pscoast $REGION -Ggray -Dh -J$proj -Bxag -Byag -B+t"${proj}" -K  > $outfile
echo $X1 $Y1 | gmt psxy -R -J -Sc0.25c -Ggreen -O -K -N >> $outfile
echo $X2 $Y2 | gmt psxy -R -J -Sc0.25c -Ggreen -O -K -N >> $outfile

proj="s0/-90/-71/1:10000000"
gmt pscoast $REGION  -Ggray -Dh -J${proj} -Bxag -Byag -B+t${proj} -X9c -K -O >> $outfile
echo $X1 $Y1 | gmt psxy -R -Js -Sc0.25c -Ggreen -O -K -N >> $outfile
echo $X2 $Y2 | gmt psxy -R -Js -Sc0.25c -Ggreen -O -K -N >> $outfile

proj="S0/-90/5c"
gmt pscoast -Ggray -Dh -J$proj $REGION -Bxag -Byag -B+t${proj} -X9c -K -O >> $outfile
echo $X1 $Y1 | gmt psxy -R -JS -Sc0.25c -Ggreen -O -K -N >> $outfile
echo $X2 $Y2 | gmt psxy -R -JS -Sc0.25c -Ggreen -O -N >> $outfile
gmt psconvert -A -P -Tg $outfile

Full error message

No error messages result.

Actual outcome
stereo_test

System information

  • Operating system: MacOS 12.5
  • GMT version (6.4.0): installed with homebrew
@smudog smudog added the bug Something isn't working label Aug 6, 2022
@welcome
Copy link

welcome bot commented Aug 6, 2022

👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. We appreciate that you took the time to contribute!

Please make sure you read our Contributing Guide and abide by our Code of Conduct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant