hddd.ddddd“ 는 도 단위를 더욱 세분화 하기 위해 도 단위의 소수 자리까지 표현한 형태
# table = 좌표를 계산해야 할 테이블 명
# x, y = table안의 x, y 컬럼 명, 'x','y'로 넣어준다
def hddd_to_wgs84(table,x,y):
table['x_1'] = table[x].apply(lambda x : int(str(x)[:3]))
table['x_2'] = table[x].apply(lambda x : float("%0.3f" % float(str(x)[3:])))
table['y_1'] = table[y].apply(lambda x : int(str(x)[:2]))
table['y_2'] = table[y].apply(lambda x : float("%0.3f" % float(str(x)[2:])))
for i in range(table.shape[0]):
table.iloc[i,table.columns.get_loc('x')] = table.iloc[i,table.columns.get_loc('x_1')] +table.iloc[i,table.columns.get_loc('x_2')]/60
table.iloc[i,table.columns.get_loc('y')] = table.iloc[i,table.columns.get_loc('y_1')]+table.iloc[i,table.columns.get_loc('y_2')]/60
table.drop(['x_1','x_2','y_1','y_2'],axis=1, inplace=True)