rspatial / geosphere

R geosphere package
GNU General Public License v3.0
34 stars 7 forks source link

Reimplement gcIntersect() and gcIntersectBearing() to use GeographicLib #10

Open casa-henrym opened 1 year ago

casa-henrym commented 1 year ago

I raised issue #5 back in 2020 about the failure of gcIntersectBearing() when there is an attempt to take the acos() of a value ever so slightly greater than 1 or ever so slightly less than -1. I am still using my hacked-up version of gcIntersectBearing() but I would now like to request that these functions be superceded by versions that call Charles Karney's GeographicLib.

Charles has provided the C++ code for the intersection of two geodesics in the GeographicLib forum.

Unfortunately my C++ skills are nonexistent otherwise I'd be submitting a pull request!