I have coordinates given in a Mollweide projection and need to transform them into lat,lon. The coordinates have an ESRI:54009 specification attached to them. See this link.
That particular EPSG web page gives projected bounds that GMT’s mapproject -Jw is unable to match. For example, the western bound value is given on ESPG to be -18040095.7 meters. If we use that western bound and request the lon,lat from mapproject, we get:
> echo -18040095.7 0.0 | gmt mapproject -Jw0/1:1 -R-180/180/-90/90 -C -Fe -I --FORMAT_FLOAT_OUT=%.8f
NaN NaN
And if, we try sending -180°,0 through mapproject to get what it thinks is the western Mollweide bound, we get:
which is about 20,166.2 meters short of the ESRI:54009 western bound. Huh?
Same kind of thing happens along the prime meridian. Transforming 0,90 through mapproject gives a value of 9009964.76119818 meters; about 10,083.09 meters short of the ESRI:54009 value (half of the E/W value. Ooo, that should tell us something.).
Is there more than one Mollweide projection? The only thing that makes sense is that the ESRI-based coordinates are scaled in some fashion (or mapproject’s are). Everything should be based on the WGS-84 ellipsoid.
I can never confidently tell whether I’ve found a bug or that I’m simply abusing GMT is some silly way! Hence I tend to come to the forum, first!
I’d rather have someone tell me I’m a dolt for trying to do something stupid with one of the commands than get the team all riled up trying to fix something that I should have never tried to do in the first place!