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
it says “oblique”, that is, oblique Mercator, not stereographic. you are specifying JS… = stereographic.
But thanks anyway, personally I liked the question.
Why mercator?
In gmt.conf oblique is defined as
This setting applies to “oblique” projections, which in this context means
maps whose boundary is a rectangle not specified by meridians and parallels
yet another context I believe
while the examples on the mapproject
's manual page explicitly use oblique Mercator projection
Yes. Thanks. I’ll have a closer look at the docs. Can’t understand why this is so confusing to me.
what I wrote was probably totally wrong.
you wrote:
I would like to make this a rectangular map instead, i.e. I have to provide a -Rw/s/e/n+r
.
mapproject
's option -WR
gives -Rw/e/s/n
. This is rectangular but not oblique, so it returns a copy of your -R-15/60/68/90
.
Note the difference: you want -Rw/s/e/n+r
while -WR
gives -Rw/e/s/n
. -WR
does not do what you want.
See new documentation and illustration for -W in mapproject at the dev version documentation.
1 Like
As Paul wrote, this is now implemented. And I can do this:
gmt mapproject -JS36/90/30c -R-15/60/68/90 -WE
-R-1.852421104674526/62.33269965938534/126/80.96267731894207+r
which answers my question. Slick.