Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
393 views
in Technique[技术] by (71.8m points)

python - Edge's key attribute meaning OSMNX

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:

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...