mrJean1 / PyGeodesy

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

Utm.toLatLon() goes into infinite loop #26

Closed sumnamazu closed 5 years ago

sumnamazu commented 5 years ago

The function call:

utm.Utm(zone, hemisphere, easting, northing).toLatLon(None)

runs into infinite loop, when called for the following parameters:

zone = 55 hemisphere = 'S' easting = 321441.0425108216 northing = 5810117.133231169

It cannot reach desired epsilon

mrJean1 commented 5 years ago

Thank you for reporting the issue and a test case to reproduce the problem.

A fix is forthcoming, in addition to a new keyword argument for Utm.toLatLon(..., eps=EPS) to limit the convergence.

mrJean1 commented 5 years ago

Pygeodesy 19.3.6 includes 2 fixes for the issue. The convergence check in the Utm.toLatLon method has been modified and the new keyword argument eps=EPS can be used if needed.

Also, the test/testUtm.py module has been updated with 10 new tests based on your and another case. Please verify or run python setup.py test to make sure that the problem is indeed fixed for your particular environment.

mrJean1 commented 5 years ago

Closed, reopen if needed.