Hammer projection bug?


using GMT from git, I am getting weird isssues with presumably geographic grids when the grd has negative longitudes and I am picking the projection center in the negative range. For example, make a grd

grdmath -R-100/-50/-10/10 -I5 Y = tmp.grd

plot it with Robinson works fine
> grdimage -JN-50/2 tmp.grd > tmp.ps
(no issues)

but when I try Hammer

grdimage -JH-50/2 tmp.grd > tmp.ps
grdimage [ERROR]: Western boundary is > 180 degrees from specified central meridian and thus your region is invalid
grdimage [ERROR]: General map projection error

Seems like this should not happen?



Should not! But if the programmer (me) is so stoopid to not know that 410 degrees is probably 360 + 50 and by removing the 360 we are good to go. Just approved https://github.com/GenericMappingTools/gmt/pull/8240#pullrequestreview-1797375609.