Open bjoernffm opened 3 months ago
Hello,
as described here, the Vincenty formular can fail to converge in some cases:
Vincenty’s inverse solution can fail on nearly antipodal points. Testing with GeographicLib test data, I’ve found this can happen with distances greater than 19,936 km, or within around 75 km of the antipodal point.
I've added a test case and will update the documentation.
As a workaround you can wrap the getDistance()
method call in try {} catch {}
and recalculate with Haversine
in the case that Vincenty fails.
Hi there,
I try to calculate the distance between two points using this code:
It throws an
NotConvergingException
and I don't understand why.Is there any solution to this problem or is the vincenty method limited regarding any circumstances?
Thank you!