parameters: (self, i=None)
docstring: Returns the offset in a .shp file for a shape based on information
  		in the .shx index file.
docstring_summary: Returns the offset in a .shp file for a shape based on information
  		in the .shx index file.
docstring_tokens: Returns the offset in a . shp file for a shape based on information in the . shx index file .
function: def __shapeIndex(self, i=None):
  		"""Returns the offset in a .shp file for a shape based on information
  		in the .shx index file."""
  		f = self.__getFileObj(self.shx)
  		if not f:
  			return None
  		if not self._offsets:
  			# File length (16-bit word * 2 = bytes) - header length
  			f.seek(24)
  			shxRecordLength = (unpack(">i", f.read(4))[0] * 2) - 100
  			numRecords = shxRecordLength / 8
  			# Jump to the first record.
  			f.seek(100)
  			for r in range(numRecords):
  				# Offsets are 16-bit words just like the file length
  				self._offsets.append(unpack(">i", f.read(4))[0] * 2)
  				f.seek(f.tell() + 4)
  		if i:
  			return self._offsets[i]
function_tokens: def __shapeIndex ( self , i = None ) : f = self . __getFileObj ( self . shx ) if not f : return None if not self . _offsets : # File length (16-bit word * 2 = bytes) - header length f . seek ( 24 ) shxRecordLength = ( unpack ( ">i" , f . read ( 4 ) ) [ 0 ] * 2 ) - 100 numRecords = shxRecordLength / 8 # Jump to the first record. f . seek ( 100 ) for r in range ( numRecords ) : # Offsets are 16-bit words just like the file length self . _offsets . append ( unpack ( ">i" , f . read ( 4 ) ) [ 0 ] * 2 ) f . seek ( f . tell ( ) + 4 ) if i : return self . _offsets [ i ]