Whole file
protomaps/pmtiles
The author described this change as “fix reader.py reading all the tiles (#357)”. It counts as a record because the check below fails on the code as it stood at 5b8627b0d and passes on ea1657d8f, with nothing else changed between the two runs.
Projectprotomaps/pmtiles
Fix saved2024-02-10
Sharing licenceBSD-3-Clause · LICENSE
Change size+4 −3
What the code was meant to do, written into the code itself as a save note
fix reader.py reading all the tiles (#357)
The change
| 63 | 63 | entries = deserialize_directory(get_bytes(dir_offset, dir_length)) | |
| 64 | 64 | for entry in entries: | |
| 65 | 65 | if entry.run_length > 0: | |
| 66 | - | yield tileid_to_zxy(entry.tile_id), get_bytes( | |
| 67 | - | header["tile_data_offset"] + entry.offset, entry.length | |
| 68 | - | ) | |
| 66 | + | for i in range(entry.run_length): | |
| 67 | + | yield tileid_to_zxy(entry.tile_id + i), get_bytes( | |
| 68 | + | header["tile_data_offset"] + entry.offset, entry.length | |
| 69 | + | ) | |
| 69 | 70 | else: | |
| 70 | 71 | for t in traverse( | |
| 71 | 72 | get_bytes, |
The check that tells the two apart
fail→pass·python/test/test_reader_writer.py::TestReaderWriter::test_all_tiles
Check file python/test/test_reader_writer.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 it5b8627b0d8367c012d9864f1847f0c47558bb9c8
Broken version dated2024-02-07
Modulepython.pmtiles.reader
Units changedtraverse
Fingerprint9294ae25590ca0e6
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.