#NEWLINE# def get_geocodes( self , bbox ) : #NEWLINE# #INDENT# 'Return a list of keys covering a given area.\n\n        Parameters:\n\n        bbox -- Bounding box of the desired region.\n        ' #NEWLINE# ( w , s , e , n ) = map ( float , bbox ) #NEWLINE# n = min ( C . MAXGHLAT , n ) #NEWLINE# s = min ( C . MAXGHLAT , s ) #NEWLINE# assert ( ( w <= e ) and ( s <= e ) ) #NEWLINE# gcset = set ( ) #NEWLINE# gc = geohash . encode ( s , w , self . precision ) #NEWLINE# bl = geohash . bbox ( gc ) #NEWLINE# s_ = bl [ 's' ] #NEWLINE# while ( s_ < n ) : #NEWLINE# #INDENT# w_ = bl [ 'w' ] #NEWLINE# gc = geohash . encode ( s_ , w_ , self . precision ) #NEWLINE# bb_sn = geohash . bbox ( gc ) #NEWLINE# while ( w_ < e ) : #NEWLINE# #INDENT# gcset . add ( gc ) #NEWLINE# bb_we = geohash . bbox ( gc ) #NEWLINE# w_ = bb_we [ 'e' ] #NEWLINE# gc = geohash . encode ( s_ , w_ , self . precision ) #NEWLINE# #UNINDENT# s_ = bb_sn [ 'n' ] #NEWLINE# #UNINDENT# assert ( len ( gcset ) > 0 ) #NEWLINE# return [ gc for gc in gcset ]