Bug #1032

Inappropriate MAP_POLAR_CAP default value for linear projection with polar coordinates (-JP)

Added by Dongdong over 3 years ago. Updated about 3 years ago.

Status:ClosedStart date:2017-01-18
Priority:NormalDue date:
Assignee:Paul% Done:


Target version:Candidate for next bugfix release
Affected version:5.x-svn Platform:


MAP_POLAR_CAP has a default value 85/90. This default value is OK for geographic-related projections.
However, for most linear projection with polar coordinates (-JP), this default value makes radial lines disappear in r<5.

Example below helps explain this bug. When R=0/360/0/10, half of the radial don't show. When R=0/360/0/1, all radial lines disappear.

gmt psbasemap -R0/360/0/90 -JP6c -Bxg30 -Byg30 -B+t'-R=0/360/0/90' -K > test.ps
gmt psbasemap -R0/360/0/10 -JP6c -Bxg30 -Byg1 -B+t'-R=0/360/0/10' -K -O -X8c >> test.ps
gmt psbasemap -R0/360/0/1 -JP6c -Bxg30 -Byg0.1 -B+t'R=0/360/0/1' -O -X8c >> test.ps

This unexpected behavior may make users confusing, especially for new GMT users.
Although users can modify MAP_POLAR_CAP value to fix this issue, it may be better if it has a more reasonable default value, such as 5%?

test.jpg (345 KB) Dongdong, 2017-01-18 05:21


#1 Updated by Paul over 3 years ago

  • Status changed from New to Feedback
  • Assignee set to Paul

We did not consider the polar r,theta projection when MAP_POLAR_CAP was implemented. So there are two options:

  1. Declare a bug and restrict this default feature to geographic maps only, as it was intended.
  2. Extend the behavior to also apply to r-theta plots.

If we were to do the latter then clearly the 85/90 default is somewhat meaningless. Also, 5% is not so good either since anyone would want it to be a multiple of some gridline spacing and not just some floating point 5% fraction of the range. So my first suggestion would be we declare a bug and restrict it to geographic maps.
Comments welcome!

#2 Updated by Dongdong over 3 years ago

The first option sounds good.

#3 Updated by Paul about 3 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 0 to 100

Finally remembering to do this. In r17736.

#4 Updated by Joaquim about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF