Finding the rectangular domain that covers an oblique area

My script looks like this (1st figure):

gmt pscoast -Bafg -JS36/90/30c -R-15/60/68/90 -Ggray -png pie

I would like to make this a rectangular map instead, i.e. I have to provide a -Rw/s/e/n+r. To obtain this I do:

$ gmt mapproject -JS36/90/30c -R-15/60/68/90 -Wn0/0
-1.85242110467        62.3326996594

$ gmt mapproject -JS36/90/30c -R-15/60/68/90 -Wn1/1
126   80.9626773189

and use this in -R (2nd figure):

gmt pscoast -Bafg -JS36/90/30c -R-1.85242110467/62.3326996594/126/80.9626773189+r -Ggray -png rectangular

Reading about mapproject -Wr/R:

To output the rectangular domain that covers an oblique area as defined
by -R -J, append r, or use R to get the result in -Rw/e/s/n string format.

I was hoping that this would give me the wanted -R:

$ gmt mapproject -JS36/90/30c -R-15/60/68/90 -WR
-R-15/60/68/90

But obviously this just gives me the input -R. I don’t understand when mapproject -Wr/R would give valuable information. Am I misunderstanding the description of mapproject -Wr/R?

Is there any way of getting -R-1.85242110467/62.3326996594/126/80.9626773189+r out of mapproject given -JS36/90/30c -R-15/60/68/90?

1 Like