Tool for generating SimMobility road network inputs from OpenStreetMap (OSM) - smart-fm/simmobility-prod GitHub Wiki
This is an automated pipeline for generating SimMobility road network tables from OpenStreetMap. The code base is modular and has modified libraries:
- networkx=2.0 (other version might not compatible)
- osmnx (modified as much as we need)
You can access the tool here.
How to generate road network tables from OpenStreetMap
-
In simmobility_from_osm.py :
boundary = [coord_1,coord_2,coord_3,coord_4], define a boundary of the interest of area whose network you want to query. It can be either polygon shape file or bounding box. You can specify bounding box (4 coordinates) using the following tool: https://www.openstreetmap.org/export#map=10/35.2086/-80.8532 -
Run simmobility_from_osm.py to generate SimMobility road network tables and shapefiles in WGS84 projection. The output files are located in folders
Outputs/Test/simmobility_wgs84andOutputs/Test/shapefilesrespectively. -
Project road network modules to x, y coordinate system from latitude and longitude system: project.py (Projects all SimMobility road network files)
-
Upload all SimMobility files to the database: uploadToDb.py
Note that you might need to install the packages geopy and rtree if you do not already have them on your machine.
Note: The turning paths (lane to lane connections) are generated in all lanes to all lanes (greedy). The feature of turning path generation by integration of SUMO will be implemented soon.