Skip to main content

hosha-network (歩車ネットワーク)

PyPI version

A Python library to construct detailed pedestrian-vehicle layered networks from macro-level road data.

マクロレベルな道路データから,歩行者と車両の詳細な動態を表現する歩車分離ネットワークを構築する Python ライブラリです.

Overview 概要

hosha-network is a Python library for constructing a micro network that expresses the detailed dynamics of pedestrians and vehicles from a macro road network consisting of undirected links and intersection nodes. By extending intersections to add entrance/exit nodes and transition links, it creates a directed network divided into layers for pedestrians and vehicles.

hosha-network は,無向リンクと交差点ノードからなるマクロな街路ネットワークから,歩行者と車両の詳細な動きを表現できるミクロなネットワークを構築するための Python ライブラリです.交差点を拡張して遷移リンクや出入口ノードを挿入し,歩行者と車両のレイヤーに分かれた有向ネットワークを作成します.

Features 特徴

  • 🚶‍♂️🚗 Separate layers for pedestrians and vehicles: Sidewalks are generated on both sides of vehicle lanes, enabling independent analysis for pedestrians and vehicles.

  歩行者と車両のレイヤー分離:車道の両外側に歩行空間を設けることで,歩行者と車両を別レイヤーで扱い,それぞれの移動特性に基づいた解析が可能になります.

  • 🚥 Vehicle Turning movement representation: Transition links for vehicle right-turn, left-turn, u-turn and straight movement are inserted to represent detailed behavior at intersections.

  車両の遷移動作の明示:直進・右左折・Uターンを表す遷移リンクを交差点に挿入し,車両の交差点内の詳細な動作を再現します.

  • 🚸 Pedestrian crossing movement representation: Crossing links for pedestrians are placed around vehicular transitions, clearly capturing pedestrian crossing behavior.

  歩行者の横断行動の明示:車両の遷移リンクの外側に歩行者用の横断リンクを設け,横断行動を明確に表現します.

  • 📍 Midlink segmentation: Road segments are divided at their midpoints, enabling precise modeling of trip origins and destinations even along road sections.

  中点での道路分割:歩行空間・車道リンクは中点で分割され,交差点以外の街路上でも正確な出発・到着(OD)表現が可能になります.

Citation 引用

  • Hasada, H. (2026). Foundational Tools for Identifying Detailed Routes Based on Street Structure: Pedestrian–Vehicle Network Construction and Map Matching. Japanese Journal of JSCE, 82(6), 25–00166. doi:10.2208/jscejj.25-00166
    羽佐田 紘之. (2026). 街路構造に基づく詳細な経路推定の基盤技術:歩車ネットワーク構築とマップマッチング. 土木学会論文集, 82(6), 25–00166. doi:10.2208/jscejj.25-00166

Acknowledgment 謝辞

This library includes the results of Cross-ministerial Strategic Innovation Promotion Program (SIP) 3rd Phase, “Development of Smart Mobility Platform” promoted by Council for Science, Technology and Innovation, Cabinet Office. (Project Management Agency:New Energy and Industrial Technology Development Organization (NEDO) (Project Code JPNP23023))

本ライブラリには,内閣府総合科学技術・イノベーション会議の下で推進する「戦略的イノベーション創造プログラム(SIP)第3期/スマートモビリティプラットフォームの構築」(研究推進法人:国立研究開発法人新エネルギー・産業技術総合開発機構)(NEDO管理番号:JPNP23023)の成果が含まれています.

References 参考文献

  • 羽佐田紘之, 池谷風馬, 鳥海梓, 本間裕大, and 大口敬. 2025. “歩車ネットワークの構築と「安心とこてくゾーン」の設定手法理論の検討.” In 第71回土木計画学研究発表会・講演集.

Installation インストール

pip install hosha-network

Usage 使い方

from hosha_network import develop_hosha_network

develop_hosha_network(link_df, node_df, output_dir="./output")

Function 関数

Function develop_hosha_network() generates a layered pedestrian-vehicle network from macro-level road data in GMNS format.

関数develop_hosha_network() は,GMNS フォーマットのマクロ道路データから歩車分離ネットワークを構築します.

Parameters 引数:

English

  • link_df: DataFrame with columns: link_id, from_node_id, to_node_id, length (follows GMNS format)
  • node_df: DataFrame with columns: node_id, x_coord, y_coord (follows GMNS format with EPSG:4326)
  • output_dir: Output directory for saving results.

Other optional keyword arguments can be used for fine-tuning the construction process.

日本語

  • link_df: link_id, from_node_id, to_node_id, length を含むデータフレーム (GMNS フォーマットに準拠).
  • node_df: node_id, x_coord, y_coordを含むデータフレーム (GMNS フォーマットに準拠、EPSG:4326のみ対応).
  • output_dir: 結果を保存する出力先ディレクトリ.

他のオプションのキーワード引数を使用して,構築方法を調整することも可能です.

Metadata

Release files for hosha-network 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hosha-network 1.0.2
File Size Uploaded Provenance Actions
hosha_network-1.0.2.tar.gz 24.5 kB Without provenance Details for hosha_network-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hosha-network 1.0.2
File Interpreter ABI Platform Actions
hosha_network-1.0.2-py3-none-any.whl Python 3 none any Details for hosha_network-1.0.2-py3-none-any.whl

Total release size: 46.8 kB

Release files / hosha_network-1.0.2.tar.gz

Download URL hosha_network-1.0.2.tar.gz
Size 24.5 kB
Tags Source
SHA-256 checksum
How to use checksums
234104e9ff02cc884d5494b623c57705f6a741943c4cc2fd9e7dbf3444a0ad68
BLAKE2b-256 checksum
How to use checksums
500a1485cc8116301050e68e67d375dd925ff79b93e9c2072cbdd691b287bed8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / hosha_network-1.0.2-py3-none-any.whl

Download URL hosha_network-1.0.2-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83883f4b1be1442c49e3345acd7a4e61c791c30b888e10d8ba425f096a03b27d
BLAKE2b-256 checksum
How to use checksums
49b329d9cd2337c71a28762383e6b5dbc3f454d13303661165df22c0cdb6e849
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Security for hosha-network 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page