osm2gmns
osm2gmns is a high-performance Python package designed to convert OpenStreetMap (OSM) data into standardized transportation networks. Leveraging a C++ core wrapped in an intuitive Python interface, osm2gmns offers both computational speed and ease of use. It empowers researchers and practitioners to generate detailed, multi-modal networks (driving, cycling, walking, railway, aeroway) for any region worldwide with minimal coding effort.
The package outputs networks primarily in the GMNS (General Modeling Network Specification) format, promoting interoperability and simplifying data exchange within the transportation modeling community.
>>> import osm2gmns as og
>>> net = og.getNetFromFile('map.osm')
>>> og.outputNetToCSV(net)
Note
Version Compatibility: osm2gmns v1.x introduces significant architectural changes and new features, therefore it is not fully backward compatible with v0.x. Features like Multi-Resolution Modeling (MRM) are currently exclusive to v0.x. For MRM, please consult the v0.x user guide.
Key Features
Performance and Usability
High-Performance Core: Written in C++ for maximum computational efficiency
Intuitive Python Interface: Simple API makes complex network extraction straightforward
Ready-to-Use Networks: Automatic inference of critical attributes (lanes, speed, capacity)
Comprehensive Network Modeling
Multi-Modal Support: Generate networks for vehicles, bicycles, pedestrians, railways, and aeroways
Directed Network Generation: Automatic creation of directional links for bidirectional roadways
GMNS Compatibility: Standardized output format for interoperability with other tools
Advanced Functionality
Intersection Consolidation: Simplifies complex junctions for various modeling needs
Movement Generation: Creates turning movements at intersections
Traffic Zone Creation: Supports origin-destination modeling
Short Link Combination: Improves network topology for simulation
Network Visualization: Built-in tools for visual inspection and verification
Citation
If osm2gmns contributes to your research, please cite the following publication:
Lu, J., & Zhou, X.S. (2023). Virtual track networks: A hierarchical modeling framework and open-source tools for simplified and efficient connected and automated mobility (CAM) system design based on general modeling network specification (GMNS). Transportation Research Part C: Emerging Technologies, 153, 104223. [link]