0
0

道路ネットワークのグラフ生成(OpenStreetMap)

Last updated at Posted at 2024-09-22

こんにちは。
OpenStreetMap データを用いて、道路ネットワークのグラフを生成しました。

今回、オリジナル に対して機能追加し、地図上可視化および simplification(グラフの2次vertex削除のこと1;directed だけではなく undirected グラフに対しても2)の機能を加えました。

  • displayGraph(graph): display the graph on a map
  • simplifyGraph(graph): reconstruct the graph by removing degree-2 vertices
地図上可視化例

高速道路の例です3
graph.jpg

console.log
The imported OSM data contains 869 nodes and 165 ways.
The converted graph contains 220 vertices and 186 edges.
The processed graph contains 38 vertices and 43 edges.

下記は directed and undirected ways が混在する例です(水色と緑色で表示)。
brussel.jpg

  1. 解説例:OSMnx: Python for Street Networks の中の "3. Correct and simplify network topology"

  2. OpenStreetMap データモデルでは、directed and undirected ways が混在し、後者のグラフに対する正確な simplification 機能実現についての先行例が見つからず今回自力で苦労して作りました。

  3. 日本の高速道路を OSM データから抽出

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0