Ejemplo n.º 1
0
hoge = DataAccess()
count = 0
list_latitude = {}
list_longitude = {}
#赤道、極半径
red_rad = 6378.137
pol_rad = 6356.752
name = {}
name_ex = {}
name_box = []
time_box = []

#化成緯度、経度それぞれ辞書型に格納
for id_n in range(1, 11):
    x = list(itertools.chain.from_iterable(hoge.get_spots(id_n)))
    #化成緯度のリスト
    list_latitude[count] = x[2]
    list_longitude[count] = x[3]
    name[count] = x[0]
    name_ex[count] = x[0]
    name_box.append(x[0])
    count += 1


def make_dist(point_A, point_B):
    #print(point_A + "から" + point_B + "までの時間")
    #適当なidを取得
    for i in name:
        if name[i] == point_A:
            id_A = i
Ejemplo n.º 2
0
from dataaccess import DataAccess
from db import DB
da = DataAccess()
spot_list = da.get_spots()
for spot in spot_list:
    print(spot)
print("----")
spot_list = da.get_spots_by_area("神奈川")
for spot in spot_list:
    print(spot)
print("----")
spot_list = da.get_latlng_by_spot_name("皇居")
for spot in spot_list:
    print(spot)
print("----")

spot_list = da.get_openclose_by_spot_name("皇居")
for spot in spot_list:
    print(spot)
print("----")
spot_list = da.get_spot_by_features(1, 0, 1, 1, 0)
for spot in spot_list:
    print(spot)
print("----")
spot_list = da.get_spot_by_branch(22)
for spot in spot_list:
    print(spot)