一个关于用户运动轨迹的项目,接触到OSM及OSMnx包。
OSM是Open Street Map开源地图数据库,Geoff Boeing的博客提供了OSMnx的Python包。
OSMnx,简称ox。其中主要分为两种地图模型,一种是区块数据(gdf_from_place),另外一种是道路模型(graph_from_place)。
而获取相应地图数据,可以有以下几种方式:
- a bounding box
- a lat-long point plus a distance(经纬度)
- an address plus a distance(地址)
- a polygon of the desired street network’s boundaries
- a place name or list of place names(地名)
相应的地图数据类别包括:具体参照英文字面意思即可
- ‘drive’ – get drivable public streets (but not service roads)
- ‘drive_service’ – get drivable public streets, including service roads
- ‘walk’ – get all streets and paths that pedestrians can use (this network type ignores one-way directionality)
- ‘bike’ – get all streets and paths that cyclists can use
- ‘all’ – download all (non-private) OSM streets and paths
- ‘all_private’ – download all OSM streets and paths, including private-access ones
除了上述内容外,还包括道路距离、(非)交叉路、道路长度颜色区分、最短路径、起始点、终点等等。具体请参照:
http://geoffboeing.com/2016/11/osmnx-python-street-networks/
http://www.chinacloud.cn/show.aspx?id=24693&cid=16
仍待继续学习........