Geodesic calculations in GMT

Is there a solution to direct geodesic problem in GMT ?

Yes it has, just not sure where without diving in the manuals. project is one place but it’s spherical approximation only. I’m sure we have functions that use Vincent’s algorithm but again, don’t know a pointer from top of my head.

And you may also be interested in this story that was quite discussed in this forum

I have noticed the usages of project module, but it is a bit inconvenient

$ gmt project -C0/0 -A45 -G100 -L0/100 -Q
-3.18055468146e-15	3.18055468146e-15	0
0.635941801416	0.635902632934	100

It requires -L option and cannot get a single point.

Also, I want an ellipsoid solution in GMT.

Hey, not sure if you’ve solved this yet, but gmt mapproject might be the thing you’re looking for… it has a -je option where you can specify the algorithm you want to use (including Vincenty).

Hello, there is only a sulution to the inverse geodesic problem in mapproject, i.e. get the azimuth and distance between two points.

I’m sure you know, but PROJ includes the utility geod which can calulate the inverse and direct problem. Take a look at the examples.

1 Like