Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.35 KB

readme.md

File metadata and controls

41 lines (31 loc) · 1.35 KB

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.