bounding_box = ((gps_df.longitude.min(), gps_df.longitude.max(),
gps_df.latitude.min(), gps_df.latitude.max()))
# Downloading the map as a graph object
g = ox.graph_from_bbox(north, south, east, west, network_type='drive')
route = []
# get the nearest nodes to the locations
for i in range(len(lat_list)):
node = ox.get_nearest_node(g, (lat_list[i], long_list[i]))
route.append(node)
#flat the lists
edge_nodes = list(zip(route[:-1], route[1:]))
您可以使用python的osmnx包。您可以创建纬度和经度坐标的边界框,检索此框的相应地图数据,然后将横向坐标捕捉到街道网络的最近节点
相关问题 更多 >
编程相关推荐