OSM

How to preprocess OSM before creating a MATSim network, additional info about OSM

Data Reference

http://download.geofabrik.de/osm-data-in-gis-formats-free.pdf

Chapter 17, http://ci.matsim.org:8080/job/MATSim-Book/ws/partOne-latest.pdf

  1. Use osmium-tool to extract Prague: https://osmcode.org/osmium-tool/manual.html#the-osmium-command

    1. Join the districts into one polygon: ./dissolve-polygon.py MAP_MESTSKECASTI_P.json prague-polygon.json

    2. Run: osmium extract -p prague-polygon.json czech-republic-latest.osm.pbf -o prague.osm.pbf

    3. Optionally convert to osm: osmium cat prague.osm.pbf -o prague.osm

Allows to export only a small area!

  1. Export OSM data (map.osm)

  2. Compress using some tool to .osm.pbf (e. g. osmium-tool): https://osmcode.org/osmium-tool/

  3. Use SupersonicOsmNetworkReader to change data to MATSim XML (OsmNetworkReader is deprecated)

  4. Run NetworkSimplifier from MATSim - improves simulation performance, introduces artifacts

  5. Run NetworkCleaner from MATSim

Cycle Data in OSM

Refer to: https://2018.stateofthemap.org/slides/A35-Using_OpenStreetMap_to_model_bicycle_traffic_in_an_agent-based_transport_simulation.pdf

Bikes in MATSim: https://github.com/matsim-org/pt2matsim/issues/137

  • Main road with a bicycle lane

    • highway=? and cycleway=lane

  • Bicycle lane on the sidewalk

    • highway=? and cycleway=track

  • A bicycle track away from roads

    • highway=cycleway

OSM Tags in MATSim OsmNetworkReader

To process the OSM file into a MATSim network correctly, the following tags must be used:

Last updated