How to make mapproject give same azimuth as proj.org's geod?

How can I make mapproject give same azimuth as proj.org’s geod?

    y1=42.1192976 x1=-87.7447873 y2=42.1523955 x2=-87.7725841
    echo $y1 $x1 $y2 $x2|geod -pI +ellps=WGS84 #328 degrees. Same result as Google Earth.
    echo $x1 $y1 $x2 $y2|gmt mapproject -Af+v  #320 degrees, must be flat earth etc.

Yes, I read https://docs.generic-mapping-tools.org/dev/mapproject.html up and down and tried everything.

Or maybe mapproject isn’t the right tool? It’s just a straight length of railroad track. I want to get its azimuth.

Got this:

echo $x1 $y1 $x2 $y2|gmt mapproject -AF+v -fg
-87.7447873 42.1192976 -87.7725841 42.1523955 328.000085846

1 Like