Open KristofKoch opened 4 years ago
This is a great suggestion, and I will vouch for it. My experience is the same; -R...r
is often painful to do and requires several iterations, as said above. I think I asked about something similar some time ago, but I cant find the link.
I find it way easier to specify the region in, say, km relative to the desired projection center, e.g.,
-R-1500/1500/-1000/1000+uk
Isn't that a simpler mechanism?
gmt basemap -R-1500/1500/-1000/1000+uk -JL45/35/25/45/6i -Bafg -pdf map
@PaulWessel I must admit I haven't thought of this possibility. Let me toy around with it a bit and I'll report back.
Paul, if I would like to make a map created with
pscoast --MAP_FRAME_TYPE=plain -RNO -JS10/90/100/10c -B0 -png r_no -W
to be rectangular, what would be the best way? Is it possible with the method you mentioned above?
What about having an option to say to GMT, "make the map with given -R
and put it in a rectangular box" (see figure, sorry for the quality):
Sorry to hijack the thread @KristofKoch (hope it's OK). I think we want the same thing.
I found the recommendation by @PaulWessel to specify the distances from projection center quite useful but it doesn't always fit my bill if I have to fit some fixes in the extreme corners onto the plot. Then it is back to trial and error. There the idea of @anbj comes in very handy (thank you for your input) and is even simpler than my ideas presented in the original post.
Is there a way of tweaking the projection parameters to get a plot with specified dimensions when using Pauls idea? Width is no problem but height is. Say I want to fit a map on a page of DIN A4 paper (210 mm x 297 mm). I was able to achieve this with the current -R...r behavior by calculating the upper right coordinate. Am I missing something?
Additionally I found the @earth_relief_
grids to behave differently when comparing @earth_relief_01s
and @earth_relief_03s
to the rest. 01s and 03s behave like -JL... -R...r
with missing data on western and northern edges while all other detail levels plot the data right up to the edge.
gmt begin relief_selection
gmt grdimage @earth_relief_03s \
-JL6/57/56/58/20c \
-R-150/150/-150/150+uk \
-Cdem2 -I+d -Bag
gmt end show
Any news about this?
This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.
Ping?
This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.
This is a better example of what I meant, this time made with professional software.
Enter normal -R
and get your pie slice. Append e.g. f
and make gmt
fill in the blanks so you get a square/rectangular map.
ps=r-selection.ps
gmt set MAP_FRAME_TYPE plain
gmt pscoast -R-20/70/60/90 -JS-20/90/6c -W -B0 -K -B+t"-R-20/70/60/90" > $ps
gmt pscoast -X8c -R-20/60/70/60r -J -W -O -K -Slightblue -Ggray -B0 -B+t"-R-20/70/60/90f" >> $ps
gmt pscoast -R-20/70/60/90 -J -W -B0 -O >> $ps
gmt psconvert -Tg -A -Z $ps
rm gmt.*
Ping
Following up from https://github.com/GenericMappingTools/gmt/pull/6474#issuecomment-1077506566, do you think an example of that mapproject use-case in the new gmt-examples site would be sufficient for this issue?
For me, yes, to a very large degree. But I can't answer on behalf of @KristofKoch!
Just for reference; what I wanted was implemented in #6669.
@KristofKoch and @anbj , please revisit and see if #7657 provides a workable solution to some of these.
When using gridded data in non-cartesian projections with rectangular borders I run into some problems when selecting the region of interest. The current mechanism is to specify lower left and upper right corner of the region of interest when using
-R...r
. This creates some difficulties in higher latitudes when using it with projections like Lambert conic conformal-JL
as illustrated in this crude mockup:Explanation:
-R...r
-JL
with the blue dashed lines representing the center of the projectionselect
/grdimage
/etcProblems:
Feature request, open for debate:
-R
withoutr
where one specifies the northern and southern most latitudes and can use one of the following longitude specifications:-J
, proposed-R...rm
for mid (see example 1 below)-R...rx
for max (see example 2 below)-R...rn
for min (see example 3 below)select
/grdimage
/etc to cover the red areas.Example 1: The longitudes are referenced to the latitude of the projection center.
Example 2: The longitudes are the min longitudes to be present on the plot.
Example 3: The longitudes are the max longitudes displayed on the longest line of latitude.
In all cases the parameters for the "expanded" projection are calculated in the background.
While making this feature request it came to my mind that this could be seen as two different requests. One for the different ways to define the region and one for the calculation of the expanded projection parameters in the background. Please advise if I should split them.