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.
Projectmapbox/mercantile
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
| 7 | 7 | ||
| 8 | 8 | ||
| 9 | 9 | __all__ = ['ul', 'bounds', 'xy', 'tile', 'parent', 'children', 'bounding_tile'] | |
| 10 | - | __version__ = '0.8.2' | |
| 10 | + | __version__ = '0.8.3' | |
| 11 | 11 | ||
| 12 | 12 | Tile = namedtuple('Tile', ['x', 'y', 'z']) | |
| 13 | 13 | LngLat = namedtuple('LngLat', ['lng', 'lat']) | |
| ⋯ | |||
| 36 | 36 | elif lng < -180.0: | |
| 37 | 37 | lng = -180.0 | |
| 38 | 38 | if lat > 90.0: | |
| 39 | - | lng = 9.0 | |
| 39 | + | lat = 90.0 | |
| 40 | 40 | elif lat < -90.0: | |
| 41 | 41 | lat = -90.0 | |
| 42 | 42 | return lng, lat | |
The check that tells the two apart
fail→pass·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.