Using more PROJ projections with GMT

Hello everyone

I am looking to plot some data on a global map but I wanted to put some fun in it by using uncommon projections.
I could read in the ** -J|EPSG:n** section of the documentation that it is possible to pass PROJ/GDAL string argument to -J option such as :

gmt psbasemap -R-180/180/-89/89 -J"+proj=merc" -P -Bafg > map.ps

which in my case works well :
map.ps (24.6 KB)

So I wanted to try with some more exotic ones for instance the Bertin 1953 defined in PROJ Bertin 1953 — PROJ 9.3.1 documentation :

gmt psbasemap -R-180/180/-89/89 -J"+proj=bertin1953" -P -Bafg > map2.ps

But this returns me the following error :

ERROR 1: PROJ: pipeline: Pipeline: A forward operation couldn’t be constructed
ERROR 1: No inverse operation
ERROR 1: No inverse operation
ERROR 1: No inverse operation
ERROR 1: No inverse operation
ERROR 1: PROJ: bertin1953: Invalid latitude
ERROR 1: Invalid coordinate
ERROR 1: PROJ: bertin1953: Invalid latitude
ERROR 1: Invalid coordinate
ERROR 1: PROJ: bertin1953: Invalid latitude
ERROR 1: Invalid coordinate

That I did not help me to get a hint why it fails for the moment.

I was wondering if this could be related to the last paragraph of the manual that says :

" While for point and grid conversions done by mapproject and grdproject we can use all PROJ.4 projections, the situations is, however, rather more limited for mapping purposes. Here, only the subset of the PROJ.4 projections that can be mapped into the GMT projections syntax is available to use. Another aspect that is not present in PROJ.4, because it’s not a mapping library, is how to set the map scale or map dimension. We introduced the two extensions +width= size and +scale= 1:xxxx that work exactly like the map width and scale in classical GMT. It is also allowed to provide the scale (but NOT the width) by appending the string “/1:xxx” to the end of the projection parameters."

But I’m not pretty sure to understand the meaning of it.
If anybody has a clue on this, it would be thanksfull.

You wish a very nice day !!

Hi @lenhofed, thanks for daring in the PROJ possibilities but unfortunately yes, the answer lies on the paragraph you quoted. It’s actually a two issues case. For PROJ options not also supported in GMT we will not be able to create image frames, hence the statement that only mapproject is supposed to work. The other issue is that error message

pipeline: Pipeline: A forward operation couldn’t be constructed

PROJ has changed a lot since that GMT code was written and I’m honestly clueless on what that error message really means.

Dear @Joaquim

Thank you for your fast answer.
Ok so I will stay with the classical projections for now.
Hopefully one day I will have some time to enable more and fulfill my boldest dream of exotic projections.

Best regards