Как выбрать подграф из графа omsnx? - PullRequest
1 голос
/ 21 июня 2019

Я извлек дорожную сеть из Гаити, используя 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])

это результат

enter image description here

Теперь яхотел бы получить дорожную сеть только для города, скажем, 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?

...