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
Download Czech Republic (.osm): https://download.geofabrik.de/europe/czech-republic.html
Use osmium-tool to extract Prague: https://osmcode.org/osmium-tool/manual.html#the-osmium-command
Polygons describing Prague (.geojson) - 57 districts: https://www.geoportalpraha.cz/en/data/opendata/E9E20135-18B3-4163-B516-45613956B856
Join the districts into one polygon:
./dissolve-polygon.py MAP_MESTSKECASTI_P.json prague-polygon.json
Run:
osmium extract -p prague-polygon.json czech-republic-latest.osm.pbf -o prague.osm.pbf
Optionally convert to osm:
osmium cat prague.osm.pbf -o prague.osm
Optional: Create a multimodal network (roads, pt, rails, ...) __https://github.com/matsim-org/pt2matsim/wiki/Creating-a-multimodal-network-(Osm2MultimodalNetwork)
Allows to export only a small area!
Export OSM data (map.osm)
Compress using some tool to .osm.pbf (e. g. osmium-tool): https://osmcode.org/osmium-tool/
Use SupersonicOsmNetworkReader to change data to MATSim XML (OsmNetworkReader is deprecated)
Run NetworkSimplifier from MATSim - improves simulation performance, introduces artifacts
Run NetworkCleaner from MATSim
Cycle Data in OSM
Bikes in MATSim: https://github.com/matsim-org/pt2matsim/issues/137
Main road with a bicycle lane
highway=?
andcycleway=lane
Bicycle lane on the sidewalk
highway=?
andcycleway=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