code: def __shapeIndex(self, i=None):
          
          shx = self.shx
          if not shx:
              return None
          if not self._offsets:
              # File length (16-bit word * 2 = bytes) - header length
              shx.seek(24)
              shxRecordLength = (unpack(">i", shx.read(4))[0] * 2) - 100
              numRecords = shxRecordLength // 8
              # Jump to the first record.
              shx.seek(100)
              shxRecords = _Array('i')
              # Each offset consists of two nrs, only the first one matters
              shxRecords.fromfile(shx, 2 * numRecords)
              if sys.byteorder != 'big':
                   shxRecords.byteswap()
              self._offsets = [2 * el for el in shxRecords[::2]]
          if not i == None:
              return self._offsets[i]
docs: Returns the offset in a .shp file for a shape based on information
          in the .shx index file.