def load_loc(i): #geo = gh.formatPathInfo(gh.getPathInfo(42.99855039261829,-78.79622441563413,43.004905938753645,-78.78722492218014)) #TEST 2 #geo = gh.formatPathInfo(gh.getPathInfo(43.000002025901935, -78.79973274502561,43.000002025901935, -78.78740731239316)) #TEST 3 geo = gh.formatPathInfo(gh.getPathInfo(43.000002025901935, -78.79973274502561,43.000002025901935,-78.68290844917294)) #TEST 3 if i == 0: geo = gh.formatPathInfo(gh.getPathInfo(40.19930573406461,116.62929710388187,40.19930573406461,116.64757904052738)) elif i == 1: geo = gh.formatPathInfo(gh.getPathInfo(40.19930573406461,116.62929710388187,40.18579948021872,116.62929710388187)) elif i == 2: geo = gh.formatPathInfo(gh.getPathInfo(40.19930573406461,116.62929710388187,40.19930573406461,116.74119886398319)) elif i == 3: geo = gh.formatPathInfo(gh.getPathInfo(40.19930573406461,116.62929710388187,40.113846516226154,116.62929710388187)) return geo
def load_loc(): # geo = gh.formatPathInfo(gh.getPathInfo(42.99855039261829,-78.79622441563413,43.004905938753645,-78.78722492218014)) #TEST 2 # geo = gh.formatPathInfo(gh.getPathInfo(43.000002025901935, -78.79973274502561,43.000002025901935, -78.78740731239316)) #TEST 3 # geo = gh.formatPathInfo(gh.getPathInfo(43.0151832700359,-78.84845438957211,43.00169097767916, -78.84854558467862)) #TEST 6 geo = gh.formatPathInfo( gh.getPathInfo(43.01518327003597, -78.84845438957211, 43.01516954192375, -78.82999542713162) ) # TEST 7 return geo
#save_res(show_res("out"),job[0]) # calculate the distance between two points try: dis = CalDis(lat1,lng1,lat2,lng2) except Exception,e: print "error cal dis" mark_as_complete(running_id) try: con1 = getConductivity(lat1,lng1) except Exception,e: print "error cal con1" mark_as_complete(running_id) try: geo_height = getPathInfo(lat1,lng1,lat2,lng2) #print 'geo_height = ', geo_height if geo_height == None: raise Exception,e elif geo_height < 0: # I really dont understand why geo_height < 0 !!! geo_height = 0 except Exception,e: print e print "cannot grab geo_info" mark_as_complete(running_id) try: geo_height2 = formatPathInfo(geo_height) print 'geo_height2 = ', geo_height2 if geo_height2 < 0: # don't understand either
print "ERROR- Point Num ERROR OR Lack LAT LNG" mark_as_complete(job[0]) return 1 #save_res(show_res("out"),job[0]) try: dis = CalDis(lat1,lng1,lat2,lng2) except Exception,e: print "error cal dis" mark_as_complete(job[0]) try: con1 = getConductivity(lat1,lng1) except Exception,e: print "error cal con1" mark_as_complete(job[0]) try: geo_height = getPathInfo(running_id) #print geo_height if geo_height == None: raise Exception,e except Exception,e: print "cannot grab geo_info" mark_as_complete(job[0]) try: geo_height2 = formatPathInfo(geo_height) #print geo_height2 except Exception,e: mark_as_complete(job[0]) print "geo height grab error" print geo_height return 1 try:
def load_loc(): #geo = gh.formatPathInfo(gh.getPathInfo(42.99855039261829,-78.79622441563413,43.004905938753645,-78.78722492218014)) #TEST 2 #geo = gh.formatPathInfo(gh.getPathInfo(43.000002025901935, -78.79973274502561,43.000002025901935, -78.78740731239316)) #TEST 3 geo = gh.formatPathInfo(gh.getPathInfo(43.000002025901935, -78.79973274502561,43.000002025901935,-78.68290844917294)) #TEST 3 return geo
lng1 = job[0][3] lng2 = job[1][3] except Exception,e: print "ERROR- Point Num ERROR OR Lack LAT LNG" return 1 #save_res(show_res("out"),job[0]) try: dis = CalDis(lat1,lng1,lat2,lng2) except Exception,e: print "error cal dis" try: con1 = getConductivity(lat1,lng1) except Exception,e: print "error cal con1" try: geo_height = getPathInfo(job[0][1]) print geo_height if geo_height == None: raise Exception,e except Exception,e: print "cannot grab geo_info" try: geo_height2 = formatPathInfo(geo_height) print geo_height2 except Exception,e: print "geo height grab error" print geo_height return 1 try: #hei1_mean = getHeight_mean(lat1,lng1,lat2,lng2) HTT = getHTT(geo_height2)