我已使用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
内选择coords_city
的子图?