hobuinc / mgrs

Python MGRS library
https://pypi.python.org/pypi/mgrs
MIT License
111 stars 36 forks source link

Truncate, don't round. #15

Closed dwyerk closed 8 years ago

dwyerk commented 8 years ago

In version 3.0 of GEOTRANS, NGA made a change to stop rounding the results of an imprecise MGRS conversion. This patch makes the corresponding change in the C code to truncate instead of round.

See: https://en.wikipedia.org/wiki/Military_grid_reference_system#Truncate.2C_don.27t_round

hobu commented 8 years ago

Thanks. I have pushed a new 1.3.4 version to PyPI that includes this patch.