CachePackage didn't support negative bounds… oops!
This commit is contained in:
parent
c469580ac7
commit
a1dbc42f61
1 changed files with 2 additions and 2 deletions
4
src/c3nav/mapdata/utils/cache/package.py
vendored
4
src/c3nav/mapdata/utils/cache/package.py
vendored
|
@ -30,7 +30,7 @@ class CachePackage:
|
|||
filemode += ':' + compression
|
||||
|
||||
with TarFile.open(filename, filemode) as f:
|
||||
self._add_bytesio(f, 'bounds', BytesIO(struct.pack('<IIII', *(int(i*100) for i in self.bounds))))
|
||||
self._add_bytesio(f, 'bounds', BytesIO(struct.pack('<iiii', *(int(i*100) for i in self.bounds))))
|
||||
|
||||
for level_id, level_data in self.levels.items():
|
||||
self._add_geometryindexed(f, 'history_%d' % level_id, level_data.history)
|
||||
|
@ -57,7 +57,7 @@ class CachePackage:
|
|||
f = TarFile.open(fileobj=f)
|
||||
files = {info.name: info for info in f.getmembers()}
|
||||
|
||||
bounds = tuple(i/100 for i in struct.unpack('<IIII', f.extractfile(files['bounds']).read()))
|
||||
bounds = tuple(i/100 for i in struct.unpack('<iiii', f.extractfile(files['bounds']).read()))
|
||||
|
||||
levels = {}
|
||||
for filename in files:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue