Edge's key attribute meaning OSMNX

我们两清 提交于 2021-01-07 02:38:28

问题


I was trying to understand what the key column represents in the edges geodataframe, but I was unable to find anything online. Could someone help me with this?

The geodatrafame could be for instance:


回答1:


Per the OSMnx documentation:

Using OSMnx’s graph module, you can retrieve any spatial network data (such as streets, paths, canals, etc) from the Overpass API and model them as NetworkX MultiDiGraphs. OSMnx automatically processes network topology from the original raw OpenStreetMap data such that nodes represent intersections/dead-ends and edges represent the street segments that link them. MultiDiGraphs are nonplanar directed graphs with possible self-loops and parallel edges.

OSMnx models networks as NetworkX MultiDiGraph objects. MultiDiGraphs can have parallel edges. Per the NetworkX docs, the key attribute differentiates between parallel edges. Thus, edges are uniquely identified by u, v, and key.

Note that starting with OSMnx v1.0.0, edge GeoDataFrames will also be indexed by u, v, and key for consistency.



来源:https://stackoverflow.com/questions/65481559/edges-key-attribute-meaning-osmnx

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!