mrJean1 / PyGeodesy

Pure Python geodesy tools
https://mrjean1.github.io/PyGeodesy/
297 stars 58 forks source link

a.nearestOn(b, c) returns incorrect result when b == c #13

Closed psarka closed 7 years ago

psarka commented 7 years ago

Example:

In [1]: from pygeodesy.sphericalNvector import LatLon

In [2]: LatLon(1, 1).nearestOn(LatLon(2, 2), LatLon(2, 2))
Out[2]: LatLon(00°00′00.0″N, 000°00′00.0″E)

Expected output is

Out[2]: LatLon(02°00′00.0″N, 002°00′00.0″E)

Tried with versions 17.06.04 and 17.08.24.

mrJean1 commented 7 years ago

Thank you for your report. Version PyGeodesy-17.8.31 has fixes and test cases for that and this issue:

>>> LatLon(2, 2).nearestOn(LatLon(2, 2), LatLon(2, 2)) LatLon(02°00′00.0″N, 002°00′00.0″E)

Version PyGeodesy-17.8.30 has been removed.