One function
from_latlon in Turbo87/utm
The author described this change as “fix: derive hemisphere from case-insensitive zone letter in from_latlon (#157)”. It counts as a record because the check below fails on the code as it stood at 1acc80db4 and passes on 9cdcc128f, with nothing else changed between the two runs.
ProjectTurbo87/utm
Fix saved2026-07-27
Sharing licenceMIT · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a docstring
This function converts Latitude and Longitude to UTM coordinate Parameters ---------- latitude: float or NumPy array Latitude between 80 deg S and 84 deg N, e.g. (-80.0 to 84.0) longitude: float or NumPy array Longitude between 180 deg W and 180 deg E, e.g. (-180.0 to 180.0). force_zone_number: int Zone number is represented by global map numbers of an UTM zone numbers map. You may force conversion to be included within one UTM zone number. For more information see utmzones [1]_ force_zone_letter: str You may force conversion to be included within one UTM zone letter. For more information see utmzones [1]_ force_northern: bool You can set True (North) or False (South) as an alternative to forcing with a zone letter. When set, the returned zone_letter will be None. Default is None Returns ------- easting: float or NumPy array Easting value of UTM coordinates northing: float or NumPy array Northing value of UTM coordinates zone_number: int Zone number is represented by global map numbers of a UTM zone numbers map. More information see utmzones [1]_ zone_letter: str Zone letter is represented by a string value. UTM zone designators can be accessed in [1]_ .. _[1]: http://www.jaworski.ca/utmzones.htm
The change
| 70 | 70 | zone_letter = force_zone_letter | |
| 71 | 71 | ||
| 72 | 72 | if force_northern is None: | |
| 73 | - | northern = (zone_letter >= 'N') | |
| 73 | + | northern = (zone_letter.upper() >= 'N') | |
| 74 | 74 | else: | |
| 75 | 75 | northern = force_northern | |
| 76 | 76 |
The check that tells the two apart
fail→pass·test/test_utm.py::test_force_south_lowercase_letter
Check file test/test_utm.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it1acc80db486f3a931d760eba045bc142d6fe8785
Broken version dated2026-07-27
Moduleutm.conversion
Units changedfrom_latlon
Fingerprint75a5370543910058
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.