def geocode():
 vars = request.post_vars
 street = vars.get('address', None)
 postcode = vars.get('postcode', None)
 L0 = vars.get('L0', None)
 if L0:
  L0 = int(L0)
 L1 = vars.get('L1', None)
 if L1:
  L1 = int(L1)
 L2 = vars.get('L2', None)
 if L2:
  L2 = int(L2)
 L3 = vars.get('L3', None)
 if L3:
  L3 = int(L3)
 L4 = vars.get('L4', None)
 if L4:
  L4 = int(L4)
 L5 = vars.get('L5', None)
 if L5:
  L5 = int(L5)
 if street:
  Lx_ids = []
  append = Lx_ids.append
  for id in (L0, L1, L2, L3, L4, L5):
   if id:
    append(id)
  gis.google_geocode_retry = False
  results = gis.geocode(street, postcode, Lx_ids)
 else:
  results = 'NotImplementedError'
 results = json.dumps(results, separators=SEPARATORS)
 response.headers['Content-Type'] = 'application/json'
 return results

def geocode ( ) : vars = request . post_vars street = vars . get ( 'address' , None ) postcode = vars . get ( 'postcode' , None ) L0 = vars . get ( 'L0' , None ) if L0 : L0 = int ( L0 ) L1 = vars . get ( 'L1' , None ) if L1 : L1 = int ( L1 ) L2 = vars . get ( 'L2' , None ) if L2 : L2 = int ( L2 ) L3 = vars . get ( 'L3' , None ) if L3 : L3 = int ( L3 ) L4 = vars . get ( 'L4' , None ) if L4 : L4 = int ( L4 ) L5 = vars . get ( 'L5' , None ) if L5 : L5 = int ( L5 ) if street : Lx_ids = [ ] append = Lx_ids . append for id in ( L0 , L1 , L2 , L3 , L4 , L5 ) : if id : append ( id ) gis . google_geocode_retry = False results = gis . geocode ( street , postcode , Lx_ids ) else : results = 'NotImplementedError' results = json . dumps ( results , separators = SEPARATORS ) response . headers [ 'Content-Type' ] = 'application/json' return results
geocoding is the process of converting addresses into geographic coordinates .