[python]如何生成城市诺力图

来源:互联网 发布:淘宝9月什么时候有活动 编辑:程序博客网 时间:2024/05/20 20:18

诺力图:将建筑物压扁,高亮道路,构建城市地块和街道的布局图
关于osmnx包可以参考链接

import osmnx as oxfrom IPython.display import Imageox.config(log_file='./log',log_console=True,use_cache=True)image_folder='./img'extention='png'size=400place='shenzhen'point=(22.5177899960,113.9362478256)#深圳 海岸城 的诺力图gif,ax=ox.plot_figure_ground(point=point,filename=place,network_type='all',dpi=150)Image('{}/{}.{}'.format(image_folder,place,extention),height=size,width=size)

结果为:
这里写图片描述