Asymmetric grid tick marks

Dear Gurus,

on nautical and aeronautical charts the tick marks on the overlaying grid are often asymmetric. The 10’ ticks are symmetric meaning extending to both sides of the grid lines but the 1’ and 5’ ticks only extend to one side of the grid line facing away from 0° latitude and 0° longitude. This is done for easier orientation as the hemisphere is often not annotated to save plot area. No N, S, E or W next to the numbers. Please see the following example taken from an old ONC K-0:

It is absolutely clear that 22° and 23° longitude must be in the Western Hemisphere as the tick marks are pointing to the left. Analog with the latitude. 16° and tick marks pointing up? Must be Northern Hemisphere.

My experimentation brought me to this:

This is, besides the plain grid lines, completely done with custom symbols. I found no way to achieve the desired effect with the magic of -B. Or is there? I feel ~81MB ASCII table files just for global tick mark placing is a bit much. I generated those with a little helper script.

The custom symbols have some logic to know on which hemisphere they are. Here the 5’ longitude tick mark symbol as example:

0a R
if \$y > 0 then {
  0  0.25 M
  0  0    D
} elseif \$y < 0 then {
  0  0    M
  0 -0.25 D
} else {
  0  0.25 M
  0 -0.25 D
}

The symmetric tick marks (10’ & 30’) could be done with a second plot call and crosses as well, however this is ugly when the gridlines start to bend in higher latitudes. Then the “horizontal” portion of the cross starts to poke out of the bent grid line. Of course depending on projection chosen.

Do you have any ideas on how to achieve the desired effect with standard GMT tools and nudge me in the right direction?

Thank you and all the best,
Kristof

Best idea I have would be to let MAP_GRID_CROSS_PRIMARY take a leading + sign (or minus) and take that to mean “draw asymmetric ticks”. All other ideas I had fail because we always draw a cross, not a tick, so any shifting in x or y that would make the x or y tick asymmetric would mess with the other part of the cross.
Sounds like a feature request.

Which way to the ticks point for lon = ±180?

±180° lon is symmetrical just like 0° lon.

You want me to open a feature request over on GitHub?

Did it already, and linked to your post.

1 Like