地图数据的获取
- Openstreatmap 官网提供了开源的地图数据,具体下载方法自行百度。
- python环境下的osmnx库提供了对Openstreatmap 数据的多种操作方法,无需下载,操作方便。建议使用anaconda安装osmnx库,一键安装省时省力。
下面就介绍一下osmnx库的简单使用,https://github.com/gboeing/osmnx-examples具体参考官方examples代码,http://bigdata.51cto.com/art/201701/527207.htm这篇文章也简单介绍了osmnx库的使用方法。
import numpy as np
import osmnx as ox
%matplotlib inline
place = '电子科技大学(清水河校区)'
UESTC = ox.gdf_from_place(place,which_result = 1)
ox.plot_shape(ox.project_gdf(UESTC))