Metacity
  • Welcome
  • Metacity
    • Installation
    • [dev] CGAL Dependency
    • Data Import
    • Models and Attributes
    • Layers
    • Grids
    • Quad-trees
    • Dockerized Processor
    • Development notes
  • Archives
    • DataAPI
      • Development
    • MetacityGL
      • Installation
      • Creating a MetacityGL App
      • Writing Custom Layers
      • Loading Metacity Data
      • Development notes
    • BananaGL
      • Development
    • AMOS
      • Synthetic Population
        • Case Studies
        • Data Specification
        • Activity Chains
        • Spatial Distribution
        • MATSim population input and comparison
        • Households
      • MATSim
        • Basic Info
        • Running Scenario
          • Config File
          • Current state
        • Input information
          • OSM
          • Filtering GTFS
          • Coordinates
        • Output
          • Processing
      • OICT
        • MapResolver
      • Resources
        • Trafic Simulation
        • MATSim
        • Vis and Meta Software
        • Synthetic Population
        • Public Relations
        • Inspiration
    • Metacity Block Edition
      • Epic Games Mega Grant
      • 🧠Internal notes
  • Links
    • Homepage
    • GitHub
  • Code of Conduct
Powered by GitBook
On this page
  • Data Reference
  • Planet OSM
  • OpenStreetMaps
  • Cycle Data in OSM
  • OSM Tags in MATSim OsmNetworkReader
Edit on GitHub
  1. Archives
  2. AMOS
  3. MATSim
  4. Input information

OSM

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

PreviousInput informationNextFiltering GTFS

Last updated 2 years ago

Data Reference

Chapter 17,

  1. Download Czech Republic (.osm):

  2. Use to extract Prague:

    1. Polygons describing Prague (.geojson) - 57 districts:

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

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

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

  3. Optional: Create a multimodal network (roads, pt, rails, ...) __

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):

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

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

  5. Run NetworkCleaner from MATSim

Cycle Data in OSM

  • 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:

Refer to:

Bikes in MATSim:

http://download.geofabrik.de/osm-data-in-gis-formats-free.pdf
Planet OSM
http://ci.matsim.org:8080/job/MATSim-Book/ws/partOne-latest.pdf
https://download.geofabrik.de/europe/czech-republic.html
osmium-tool
https://osmcode.org/osmium-tool/manual.html#the-osmium-command
https://www.geoportalpraha.cz/en/data/opendata/E9E20135-18B3-4163-B516-45613956B856
https://github.com/matsim-org/pt2matsim/wiki/Creating-a-multimodal-network-(Osm2MultimodalNetwork)
OpenStreetMaps
https://osmcode.org/osmium-tool/
OsmNetworkReader
https://2018.stateofthemap.org/slides/A35-Using_OpenStreetMap_to_model_bicycle_traffic_in_an_agent-based_transport_simulation.pdf
https://github.com/matsim-org/pt2matsim/issues/137
matsim-libs/OsmTags.java at master · matsim-org/matsim-libsGitHub
Logo