GenericMappingTools / GenericMappingTools/gmt
GMT6: incorrect regions when plotting using EPSG:3031 (Antarctic Polar Stereographic)
- Dominant language
- C
- Stars
- 979
- Forks
- 414
- Avg merge
- 17h 26m
- Merged PRs (30d)
- 54
Description
**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**

**System information**
* Operating system: MacOS 12.5
* GMT version (6.4.0): installed with homebrew
Contributor guide
Assessment
This issue has not been assessed yet.