Whole file

mapbox/mercantile

The author described this change as Fix error in lng/lat truncation.. It counts as a record because the check below fails on the code as it stood at 271042de2 and passes on 734ca8eb9, with nothing else changed between the two runs.

Fix saved2015-08-25
Sharing licenceBSD-3-Clause · LICENSE.txt
Change size+2 2

What the code was meant to do, written into the code itself as a save note

Fix error in lng/lat truncation.

The change

77
88
99 __all__ = ['ul', 'bounds', 'xy', 'tile', 'parent', 'children', 'bounding_tile']
10-__version__ = '0.8.2'
10+__version__ = '0.8.3'
1111
1212 Tile = namedtuple('Tile', ['x', 'y', 'z'])
1313 LngLat = namedtuple('LngLat', ['lng', 'lat'])
3636 elif lng < -180.0:
3737 lng = -180.0
3838 if lat > 90.0:
39- lng = 9.0
39+ lat = 90.0
4040 elif lat < -90.0:
4141 lat = -90.0
4242 return lng, lat

The check that tells the two apart

failpass·tests/test_funcs.py::test_truncate_lat_over

Check file tests/test_funcs.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 it271042de244b3610713f9df4f392af5ae60b02e9
Broken version dated2014-12-16
Modulemercantile.__init__
Units changedtruncate_lnglat
Fingerprint382b06a458684649
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.