File name
Commit message
Commit date
import os
import pandas as pd
from ITS.api import gather_cctv_list
df = pd.read_csv("result/129.2_129.3_y35.9_36.07.csv")
name_of_original = df.loc[0]["cctvname"]
lat = df.loc[0]["coordx"]
lon = df.loc[0]["coordy"]
apiKey = os.getenv("ITS_API")
lat_lon_interval = 0.000001
api_result = gather_cctv_list(xmin=lat-lat_lon_interval, ymin=lon-lat_lon_interval, xmax=lat+lat_lon_interval, ymax=lon+lat_lon_interval, intervals=1, roadType="its", cctvType=1)
name_of_requested = api_result.loc[0]["cctvname"]
if name_of_original == name_of_requested:
print("success")
print(name_of_original)