安装:Anaconda安装Osmnx详细步骤以及问题解决_HsinglukLiu的博客-CSDN博客_anaconda安装osmnx注意下载的whl版本中cp后面的数字要和本机python版本一致。
使用案例:
import osmnx as ox
bounds = [113.75, 22.4, 114.62, 22.86]
north, south, east, west = bounds[3], bounds[1], bounds[2], bounds[0]
G = ox.graph_from_bbox(north, south, east, west, network_type='drive')
ox.io.save_graph_shapefile(G, filepath='D:\shenzhen.shp')
得到结果: