We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e26248 commit 8f671dbCopy full SHA for 8f671db
shapefile.py
@@ -389,9 +389,8 @@ def __shapeIndex(self, i=None):
389
numRecords = shxRecordLength // 8
390
# Jump to the first record.
391
shx.seek(100)
392
- for r in range(numRecords):
393
- # Offsets are 16-bit words just like the file length
394
- self._offsets.append(unpack('>i4x', shx.read(8))[0] * 2)
+ # Offsets are 16-bit words just like the file length
+ self._offsets = [unpack('>i4x', shx.read(8))[0] * 2 for r in range(numRecords)]
395
if not i == None:
396
return self._offsets[i]
397
0 commit comments