Skip to content

Osm2matsim: Convert OSM files to Matsim networks

Notifications You must be signed in to change notification settings

roma-luo/osm2matsim

This branch is up to date with gustavocovas/osm2matsim:master.

Folders and files

NameName
Last commit message
Last commit date
May 11, 2020
May 19, 2018
May 19, 2018
May 18, 2018
May 19, 2018
May 18, 2018
May 19, 2018
Jan 20, 2024
May 25, 2018
May 19, 2018

Repository files navigation

osm2matsim

Simple Java application to convert OSM files to MATSim network format, using MATSim APIs. Based on section 7.2.1 from the book and on the RunPNetworkGenerator example..

Prerequisites

A system with Docker installed for converting OSM files into Matsim network files. Java for network visualization and editing with networkEditor.

Usage

  1. Download the broad map files from http://download.geofabrik.de/

  2. Extract the desired bounding box from the larger file:

./vendor/osmosis/bin/osmosis --rb file=south-america-latest.osm.pbf \ 
 --bounding-box top=-23.5948 left=-46.6807 bottom=-23.5984 right=-46.6736 \ 
 completeWays=true --used-node --write-xml fiandeiras.osm
  1. Build the converter:
./bin/build.sh
  1. Convert:
./bin/convert.sh input/fiandeiras.osm output/fiandeiras.xml
  1. (Optional) Visualize and edit network:
./bin/edit_network.sh

Repository structure rationale

Why Docker?

To avoid issues with different jdk versions.

Why not maven or gradle?

Project too simple to justify this tools. We rely on javac and java with manually set classpaths.

About

Osm2matsim: Convert OSM files to Matsim networks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 80.6%
  • Shell 10.9%
  • Dockerfile 8.5%