Пример #1
0
def passearch_output():
  #pull 'birth_month' from input field and store it
  lat = float(request.args.get('latbox'))
  lng = float(request.args.get('lngbox'))

  # Careful w/ lat/lng order here!
  try:
      check, result, result_map, return_time = \
          passearch_backend.get_results(lng, lat, model_ims, fit_arr)
  except:
      print "UNKNOWN ERROR!!!"
      return render_template("unknown.html")

#   check, result, result_map, return_time = \
#       passearch_backend.get_results(lng, lat, model_ims, fit_arr)

  print "CHECKING", check
  if check < 1:
      return render_template("badcoords.html")

  # if all checks were OK, then continue
  return_lat = result[1]
  return_lng = result[0]

  np.save('resultmap.npy', result_map)

  model_data.set_map(result_map)

  return render_template("output.html", return_lat = return_lat, 
                         return_lng = return_lng,
                         input_lat = lat, input_lng = lng, 
                         return_time=return_time)
Пример #2
0
def passearch_output():
    #pull 'birth_month' from input field and store it
    lat = float(request.args.get('latbox'))
    lng = float(request.args.get('lngbox'))

    # Careful w/ lat/lng order here!
    try:
        check, result, result_map, return_time = \
            passearch_backend.get_results(lng, lat, model_ims, fit_arr)
    except:
        print "UNKNOWN ERROR!!!"
        return render_template("unknown.html")


#   check, result, result_map, return_time = \
#       passearch_backend.get_results(lng, lat, model_ims, fit_arr)

    print "CHECKING", check
    if check < 1:
        return render_template("badcoords.html")

    # if all checks were OK, then continue
    return_lat = result[1]
    return_lng = result[0]

    np.save('resultmap.npy', result_map)

    model_data.set_map(result_map)

    return render_template("output.html",
                           return_lat=return_lat,
                           return_lng=return_lng,
                           input_lat=lat,
                           input_lng=lng,
                           return_time=return_time)
Пример #3
0
def passearch_output():
  #pull 'birth_month' from input field and store it
##  patient = request.args.get('birth_month')
##  patient = request.args.get('latspan')
  lat = float(request.args.get('latbox'))
  lng = float(request.args.get('lngbox'))

  print "AAAAAARRRRRRGGGGGHHHHH", lat, lng

  
  # Careful w/ lat/lng order here!
  result = passearch_backend.get_results(lng, lat)  # con)
  return_lat = result[1]
  return_lng = result[0]

  return render_template("output.html", return_lat = return_lat, 
                         return_lng = return_lng,
                         input_lat = lat, input_lng = lng)
Пример #4
0
def passearch_output():
    #pull 'birth_month' from input field and store it
    ##  patient = request.args.get('birth_month')
    ##  patient = request.args.get('latspan')
    lat = float(request.args.get('latbox'))
    lng = float(request.args.get('lngbox'))

    print "AAAAAARRRRRRGGGGGHHHHH", lat, lng

    # Careful w/ lat/lng order here!
    result = passearch_backend.get_results(lng, lat)  # con)
    return_lat = result[1]
    return_lng = result[0]

    return render_template("output.html",
                           return_lat=return_lat,
                           return_lng=return_lng,
                           input_lat=lat,
                           input_lng=lng)