我已经使用海地提取了道路网络osmnx
impor omsmnx as ox
place = ox.gdf_from_place('Haiti', which_result=2)
coords = place.geometry.total_bounds
G = ox.graph_from_bbox(coords[3], coords[1], coords[2], coords[0])
这就是结果
现在我想只为一个城市获取道路网络,比方说Port-au-Prince
city = 'Port-au-Prince'
place = ox.gdf_from_place(city, which_result=2)
coords_city = place.geometry.total_bounds
是否可以选择G
inside的子图coords_city
?