parameters: (self, key, lat_lng, verbose=True)
docstring: Add a point to the grid.
  
          :param key:     the key to be added
          :param lat_lng: the lat_lng of the point (a tuple of (lat, lng))
          :param verbose: toggle verbosity
          :returns:       None
docstring_summary: Add a point to the grid.
docstring_tokens: Add a point to the grid .
function: def add(self, key, lat_lng, verbose=True):
          """
          Add a point to the grid.
  
          :param key:     the key to be added
          :param lat_lng: the lat_lng of the point (a tuple of (lat, lng))
          :param verbose: toggle verbosity
          :returns:       None
          """
          try:
              case_id = self._computeCaseId(lat_lng)
  
          except (TypeError, Exception):
              # TypeError for wrong type (NoneType, str)
              # Exception for invalid coordinates (raised by geohash module)
              if verbose:
                  print 'Wrong coordinates %s for key %s, skipping point.' % \
                          (str(lat_lng), key)
              return
  
          self._keys[key] = {
              'case'    : case_id,
              'lat_lng' : lat_lng
          }
  
          if case_id not in self._grid:
              self._grid[case_id] = []
  
          self._grid[case_id].append(key)
function_tokens: def add ( self , key , lat_lng , verbose = True ) : try : case_id = self . _computeCaseId ( lat_lng ) except ( TypeError , Exception ) : # TypeError for wrong type (NoneType, str) # Exception for invalid coordinates (raised by geohash module) if verbose : print 'Wrong coordinates %s for key %s, skipping point.' % ( str ( lat_lng ) , key ) return self . _keys [ key ] = { 'case' : case_id , 'lat_lng' : lat_lng } if case_id not in self . _grid : self . _grid [ case_id ] = [ ] self . _grid [ case_id ] . append ( key )