Gmt 6.5.0, coast fails to draw a map frame with -JEPSG:3395 (instead of -Jm)

gmt version 6.5.0.dev9+0776994 from conda-forge.

gmt coast -W1,black -BNEsw -Bxag -Byag -JEPSG:3395/1:50000 -R-63.675082478/44.6583088669/-63.5916594116/44.7333424403+r --MAP_FRAME_TYPE=plain -png quick-EPSG_3395

produces a map without map frame and displays the following errors. When I use -Jm1:50000 there are no messages and the map gets a frame.

error messages:

ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: Reprojection failed, err = 2049, further errors will be suppressed on the transform object.

debug output with -Vd:

$ gmt coast -W1,black -BNEsw -Bxag -Byag -JEPSG:3395/1:50000 -R-63.675082478/44.6583088669/-63.5916594116/44.7333424403+r --MAP_FRAME_TYPE=plain -png quick-EPSG_3395 -Vd
gmt [DEBUG]: GMT_Create_Session: Terminal width = 80
gmt [DEBUG]: Obtained the ppid from parent: 754331
gmt [DEBUG]: Enter: gmtinit_new_GMT_ctrl
gmt [DEBUG]: GMT->session.SHAREDIR = /home/mkononets/mambaforge/envs/pygmt/share/gmt
gmt [DEBUG]: GMT->session.HOMEDIR = /home/mkononets
gmt [DEBUG]: GMT->session.USERDIR = /home/mkononets/.gmt [created]
gmt [DEBUG]: GMT->session.CACHEDIR = /home/mkononets/.gmt/cache [created]
gmt [DEBUG]: GMT: 0. Will try to find subdir=postscriptlight stem = PSL_custom_fonts suffix=.txt
gmt [DEBUG]: GMT: 1. gmt_getsharepath trying current dir
gmt [DEBUG]: GMT: 2. gmt_getsharepath trying USERDIR /home/mkononets/.gmt
gmt [DEBUG]: GMT: 3. gmt_getsharepath trying USERDIR subdir /home/mkononets/.gmt/postscriptlight
gmt [DEBUG]: GMT: 4. gmt_getsharepath trying SHAREDIR subdir /home/mkononets/mambaforge/envs/pygmt/share/gmt/postscriptlight
gmt [DEBUG]: GMT: 5. gmt_getsharepath trying SHAREDIR /home/mkononets/mambaforge/envs/pygmt/share/gmt
gmt [DEBUG]: GMT: 6. gmt_getsharepath failed
gmt [DEBUG]: Map distance calculation will be Cartesian
gmt [DEBUG]: Exit:  gmtinit_new_GMT_ctrl
gmt [DEBUG]: Enter: New_PSL_Ctrl
gmt [DEBUG]: Exit:  New_PSL_Ctrl
gmt [DEBUG]: Enter: gmt_manage_workflow
gmt [DEBUG]: Exit : gmt_manage_workflow
gmt [DEBUG]: Enter: PSL_beginsession
gmt [DEBUG]: Exit : PSL_beginsession
gmt [DEBUG]: Enter: PSL_setdefaults
gmt [DEBUG]: Exit : PSL_setdefaults
gmt [DEBUG]: Enter: gmtlib_io_init
gmt [DEBUG]: Exit : gmtlib_io_init
gmt [DEBUG]: Enter: gmt_hash_init
gmt [DEBUG]: Exit:  gmt_hash_init
gmt [DEBUG]: Enter: gmt_hash_init
gmt [DEBUG]: Exit:  gmt_hash_init
gmt [DEBUG]: Enter: gmt_reload_settings
gmt [DEBUG]: The PROJ_GEODESIC set to Vincenty
gmt [DEBUG]: Look for file /home/mkononets/gmt.conf
gmt [DEBUG]: Look for file /home/mkononets/.gmt/gmt.conf
gmt [DEBUG]: Look for file /home/mkononets/.gmt/server/gmt.conf
gmt [DEBUG]: Look for file /home/mkononets/.gmt/cache/gmt.conf
gmt [DEBUG]: Could not find file gmt.conf
gmt [DEBUG]: Exit:  gmt_reload_settings
gmt [DEBUG]: Enter: gmtlib_plot_C_format
gmt [DEBUG]: Exit:  gmtlib_plot_C_format
gmt [DEBUG]: Enter: gmtinit_get_history
gmt [DEBUG]: Enter: gmt_hash_init
gmt [DEBUG]: Exit:  gmt_hash_init
gmt [DEBUG]: Exit:  gmtinit_get_history
gmt [DEBUG]: Initialize FFTW with 4 threads.
gmt [DEBUG]: GMT_Create_Session initialized GMT structure
gmt [DEBUG]: Loading core GMT shared library: libgmt.so
gmt [DEBUG]: Shared Library # 0 (core). Path = libgmt.so
gmt [DEBUG]: Loading GMT plugins from: /home/mkononets/mambaforge/envs/pygmt/lib/gmt/plugins
gmt [DEBUG]: Shared Library # 1 (supplements). Path = /home/mkononets/mambaforge/envs/pygmt/lib/gmt/plugins/supplements.so
gmt [DEBUG]: Revised options: quick-EPSG_3395 png
begin [INFORMATION]: Creating a workflow directory /home/mkononets/.gmt/sessions/gmt_session.754331
begin [DEBUG]: The PROJ_GEODESIC set to Vincenty
begin [DEBUG]: Look for file /home/mkononets/gmt.conf
begin [DEBUG]: Look for file /home/mkononets/.gmt/gmt.conf
begin [DEBUG]: Look for file /home/mkononets/.gmt/server/gmt.conf
begin [DEBUG]: Look for file /home/mkononets/.gmt/cache/gmt.conf
begin [DEBUG]: Could not find file gmt.conf
begin [DEBUG]: Set session name to be quick-EPSG_3395 png
begin [DEBUG]: Begin Workflow.  Session ID = 754331. Directory /home/mkononets/.gmt/sessions/gmt_session.754331 created.
begin [DEBUG]: GMT now running in modern mode [Session ID = 754331]
gmt [DEBUG]: Use PS filename /home/mkononets/.gmt/sessions/gmt_session.754331/gmt_0.ps-
gmt [DEBUG]: gmtinit_get_current_panel: No current panel selected so not in subplot mode
gmt [DEBUG]: Revised options: -W1,black -BNEsw -Bxag -Byag -J+EPSG:3395/1:50000 -R-63.675082478/44.6583088669/-63.5916594116/44.7333424403+r --MAP_FRAME_TYPE=plain -Vd
coast [DEBUG]: History: Process -J+EPSG:3395/1:50000
coast [DEBUG]: History: Process -R-63.675082478/44.6583088669/-63.5916594116/44.7333424403+r
coast [INFORMATION]: GMT_Parse_Options: Interval-setting -B options were reordered to appear before axis and frame -B options to ensure proper parsing.
coast [INFORMATION]: GMT_Parse_Options: New option order: -W1,black -J+EPSG:3395/1:50000 -R-63.675082478/44.6583088669/-63.5916594116/44.7333424403+r -Vd -Bxag -Byag -BNEsw --MAP_FRAME_TYPE=plain
coast [INFORMATION]: Converted to -J syntax = -Jm0/0/1:50000
coast [DEBUG]: Map distance calculation will be using great circle approximation with authalic auxiliary latitudes and authalic (R_2) radius = 6371007.1809 m, in meter.
coast [DEBUG]: Got regular w/e/s/n for region (-63.675082478/44.6583088669/-63.5916594116/44.7333424403+r)
coast [DEBUG]: Projected values in meters: -7.08828e+06 -7.07899e+06 5.53784e+06 5.54955e+06
coast [DEBUG]: Computed automatic parameters using dimension scaling: 1.04476
coast [DEBUG]: Auto-frame interval for axis 0 item 0: d = 0.0166667  f = 0.00416667
coast [INFORMATION]: Auto-frame interval for x-axis (item 0): a0.0166667f0.0166667g0.0166667
coast [DEBUG]: Auto-frame interval for axis 1 item 0: d = 0.00833333  f = 0.00277778
coast [INFORMATION]: Auto-frame interval for y-axis (item 0): a0.00833333f0.00833333g0.00833333
coast [INFORMATION]: Map scale is 0.5 km per cm or 1:50000.
coast [INFORMATION]: -D option: Selected resolution -Df
coast [DEBUG]: 1. GSHHG: GSHHGDIR set, trying /home/mkononets/mambaforge/envs/pygmt/share/gshhg-gmt/binned_GSHHS_f.nc
coast [DEBUG]: 1. GSHHG: OK, could access /home/mkononets/mambaforge/envs/pygmt/share/gshhg-gmt/binned_GSHHS_f.nc
coast [DEBUG]: Calling nc_open on /home/mkononets/mambaforge/envs/pygmt/share/gshhg-gmt/binned_GSHHS_f.nc, ncid = 65536, err = 0
coast [DEBUG]: NetCDF Library Version: 4.9.2 of Dec 10 2023 17:23:27 $
coast [DEBUG]: GSHHG with two Antarcticas, read in extra ANT flgs.
coast [INFORMATION]: Selected ice front line as Antarctica coastline
coast [INFORMATION]: GSHHG version 2.3.7
coast [INFORMATION]: Derived from World Vector Shoreline, CIA WDB-II, and Atlas of the Cryosphere
coast [INFORMATION]: Processed by Paul Wessel and Walter H. F. Smith, 1994-2017
coast [DEBUG]: Running in PS mode modern
coast [DEBUG]: Use PS filename /home/mkononets/.gmt/sessions/gmt_session.754331/gmt_0.ps-
coast [DEBUG]: Create hidden PS file /home/mkononets/.gmt/sessions/gmt_session.754331/gmt_0.ps-
coast [DEBUG]: No figure file /home/mkononets/.gmt/sessions/gmt_session.754331/gmt.figures - nothing to do
coast [DEBUG]: Got session name as quick-EPSG_3395 and default graphics formats as png
coast [DEBUG]: Basemap order: Frame = above  Grid = above  Tick/Annot = below
coast [DEBUG]: Extend from (7.31515, 0.85987) to crossing point (7.31229, 0.863889) in direction 125.371 by 0.00492994" on S side with border angle 0 and delta angle 125.371
coast [DEBUG]: Extend from (-0.143435, 6.69847) to crossing point (3.63798e-12, 6.7054) in direction 2.7686 by 0.143602" on N side with border angle 0 and delta angle 2.7686
coast [DEBUG]: Extend from (3.63798e-12, 6.80893) to crossing point (3.63798e-12, 6.80893) in direction 0 by 0" on N side with border angle 0 and delta angle 0
coast [DEBUG]: Extend from (7.31509, 1.58357) to crossing point (7.31229, 1.58756) in direction 125.028 by 0.00486768" on S side with border angle 0 and delta angle 125.028
coast [DEBUG]: Working on bin # 16496
coast [DEBUG]: Calling nc_close on ncid 65536, err = 0
coast [DEBUG]: Entering gmtplot_map_gridlines
coast [INFORMATION]: Save current gridline information to gmt.history
coast [DEBUG]: Draw meridian = 296.333 from 44.6583 to 44.7333
coast [DEBUG]: Draw meridian = 296.35 from 44.6583 to 44.7333
coast [DEBUG]: Draw meridian = 296.367 from 44.6583 to 44.7333
coast [DEBUG]: Draw meridian = 296.383 from 44.6583 to 44.7333
coast [DEBUG]: Draw meridian = 296.4 from 44.6583 to 44.7333
coast [DEBUG]: Draw parallel = 44.6583 from 296.325 to 296.408
coast [DEBUG]: Draw parallel = 44.6667 from 296.325 to 296.408
coast [DEBUG]: Draw parallel = 44.675 from 296.325 to 296.408
coast [DEBUG]: Draw parallel = 44.6833 from 296.325 to 296.408
coast [DEBUG]: Draw parallel = 44.6917 from 296.325 to 296.408
coast [DEBUG]: Draw parallel = 44.7 from 296.325 to 296.408
coast [DEBUG]: Draw parallel = 44.7083 from 296.325 to 296.408
coast [DEBUG]: Draw parallel = 44.7167 from 296.325 to 296.408
coast [DEBUG]: Draw parallel = 44.725 from 296.325 to 296.408
coast [DEBUG]: Draw parallel = 44.7333 from 296.325 to 296.408
coast [DEBUG]: Exiting gmtplot_map_gridlines
coast [DEBUG]: W/E boundaries shifted by 360
coast [DEBUG]: gmtplot_wesn_map_boundary n_sides = 4
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
coast [DEBUG]: gmtplot_wesn_map_boundary doing side 0 with flag = 1
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
coast [DEBUG]: gmtplot_wesn_map_boundary doing side 1 with flag = 0
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
coast [DEBUG]: gmtplot_wesn_map_boundary doing side 2 with flag = 0
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: Reprojection failed, err = 2049, further errors will be suppressed on the transform object.
coast [DEBUG]: gmtplot_wesn_map_boundary doing side 3 with flag = 10
coast [DEBUG]: Current size of half-baked PS file /home/mkononets/.gmt/sessions/gmt_session.754331/gmt_0.ps- = 25349.
coast [DEBUG]: gmtlib_get_graphics_item: Fig: 0 Subplot: 2 Panel: () Inset: 0
coast [DEBUG]: No current cpt file found
coast [DEBUG]: GMT now running in modern mode [Session ID = 754331]
coast [DEBUG]: Revised options: show
end [DEBUG]: End Workflow.  Session ID = 754331. Directory /home/mkononets/.gmt/sessions/gmt_session.754331 removed.
end [DEBUG]: No figure file /home/mkononets/.gmt/sessions/gmt_session.754331/gmt.figures - nothing to do
end [DEBUG]: No figure file /home/mkononets/.gmt/sessions/gmt_session.754331/gmt.figures - nothing to do
end [DEBUG]: Got session name as quick-EPSG_3395 and default graphics formats as png
end [INFORMATION]: Process GMT figure queue: 1 figures found
end [INFORMATION]: Processing GMT figure #0 [quick-EPSG_3395 png ]
end [DEBUG]: gmtlib_get_graphics_item: Fig: 0 Subplot: 2 Panel: () Inset: 0
end [DEBUG]: psconvert: '/home/mkononets/.gmt/sessions/gmt_session.754331/gmt_0.ps-' -Tg -Fquick-EPSG_3395 -A
end [DEBUG]: GMT now running in modern mode [Session ID = 754331]
end [DEBUG]: Revised options: '/home/mkononets/.gmt/sessions/gmt_session.754331/gmt_0.ps-' -Tg -Fquick-EPSG_3395 -A
psconvert [DEBUG]: Ghostscript executable full name: 
psconvert [DEBUG]: gmt_run_process_get_first_line: Pass to popen: [gs --version 2> /dev/null]
psconvert [DEBUG]: gs --version 2> /dev/null was successful
psconvert [DEBUG]: Ghostscript version: 10.02.1
psconvert [DEBUG]: Complete partial PS file /home/mkononets/.gmt/sessions/gmt_session.754331/gmt_0.ps-
psconvert [DEBUG]: Size of half-baked PS file = 25349.
psconvert [DEBUG]: Fattened up PS file /home/mkononets/.gmt/sessions/gmt_session.754331/gmt_0.ps-
psconvert [INFORMATION]: Processing /home/mkononets/.gmt/sessions/gmt_session.754331/gmt_0.ps-...
psconvert [INFORMATION]: Find HiResBoundingBox ...
psconvert [DEBUG]: Running: gs -q -dNOSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox -DPSL_no_pagefill -dMaxBitmap=2147483647 -dUseFastColor=true '/home/mkononets/.gmt/sessions/gmt_session.754331/gmt_0.ps-' 2> '/home/mkononets/.gmt/sessions/gmt_session.754331/psconvert_2023134c.bb'
psconvert [INFORMATION]: Figure dimensions: Width: 589.464 points [20.795 cm]  Height: 683.028 points [24.0957 cm]
psconvert [DEBUG]: Delete /home/mkononets/.gmt/sessions/gmt_session.754331/psconvert_2023134c.bb
psconvert [INFORMATION]: [2875.79 2875.79 3465.25 3558.82]...
psconvert [INFORMATION]: Convert to PNG...
psconvert [DEBUG]: Running: gs -q -dNOPAUSE -dBATCH -dNOSAFER -dSCANCONVERTERTYPE=2 -dMaxBitmap=2147483647 -dUseFastColor=true -dGraphicsAlphaBits=2 -dTextAlphaBits=4 -sDEVICE=png16m  -g2457x2846 -r300 -sOutputFile='quick-EPSG_3395.png' '/home/mkononets/.gmt/sessions/gmt_session.754331/psconvert_2023134d.eps'
psconvert [DEBUG]: Delete /home/mkononets/.gmt/sessions/gmt_session.754331/psconvert_2023134d.eps
psconvert [DEBUG]: Final input buffer length was 256
end [DEBUG]: GMT now running in modern mode [Session ID = 754331]
end [DEBUG]: Revised options: quick-EPSG_3395.png
docs [DEBUG]: Opening local file quick-EPSG_3395.png via xdg-open
end [INFORMATION]: Destroying the current workflow directory /home/mkononets/.gmt/sessions/gmt_session.754331
end [DEBUG]: Delete gmt.canvas.0
end [DEBUG]: Delete gmt.conf
end [DEBUG]: Delete gmt.frame.0
end [DEBUG]: Delete gmt.layers.0
end [DEBUG]: Delete gmt.session
end [DEBUG]: Delete gmt_0.ps-
gmt [DEBUG]: Entering GMT_Destroy_Session
gmt [DEBUG]: gmtlib_get_graphics_item: Fig: 0 Subplot: 2 Panel: () Inset: 0

@Joaquim territory for sure. Since those ERRORs are coming from GDAL, what happens if you reformat the -R to not use +r?

-R-63.675082478/-63.5916594116/44.6583088669/44.7333424403 produces the same result - a plot without a frame with the same error messages (quoted below for the record)

gmt coast -W1,black -BNEsw -Bxag -Byag -JEPSG:3395/1:50000 -R-63.675082478/-63.5916594116/44.6583088669/44.7333424403 --MAP_FRAME_TYPE=plain -png quick-EPSG_3395
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: PROJ: merc: Invalid longitude
ERROR 1: Reprojection failed, err = 2049, further errors will be suppressed on the transform object.

Frames and proj4 combination were never promised to work, though for cylindrical projections it used to work, I think. It needs a complex machinery that was never created.

OK thanks good to know. It worked with 6.4.0, but not with 6.5.0, so I created the topic.

for the record, gmt basemap works fine with the same projection setup. The frame is created, no error messages displayed.

gmt basemap -BNEsw -Bxag -Byag -JEPSG:3395/1:50000 -R-63.675082478/44.6583088669/-63.5916594116/44.7333424403+r --MAP_FRAME_TYPE=plain -png quick-basemap-EPSG_3395