Routing On OpenStreetMap

Current version 4.8.8

Quantum GIS






created with XMind


For a first impression start the SlideShow

osm2po-core (FreeWare)
  • osm2po is both, a converter and a routing engine.
  • osm2po's converter parses OpenStreetMap's XML-Data and makes it routable.
  • osm2po is able to convert large sets like europe.osm
  • osm2po generates sql files for PostGIS, compatible with pgRouting and Quantum GIS.
  • osm2po creates compact topology/graph files for the integrated routing engine.
  • osm2po contains a simple HTTP routing server which returns CSV, GeoJson, SOAP or starts the WebTest-GUI.
  • osm2po runs under Windows, Unix and Mac. Just make sure you have Java 6+ installed.
  • osm2po does not depend on foreign Java libraries.
  • osm2po's core is just one file. No installation is needed.

You are free to make copies, give exact copies of the original to anyone,
distribute it in its unmodified form via electronic means.
You may not reverse engineer, de-compile or disassemble it, rent, lease, lend or sell it.
This software is provided 'AS IS', without warranty of any kind,
so use it at your own risk.

osm2po-plugins (OpenSource)
  • Creates another PostGIS-Table of Vertices
  • Enables osm2po to read from osm.bz2, pbf, o5m and o5m.gz
  • Provides some Java programming examples
osm2po 5.0.x
Winter 2014


    • Converts simple Polygons. e.g. Buildings, Areas, Riverbanks, etc. To get an impression, look at this QGis-Sample
    • Some improvements for TSP where the number of stations exceed the BruteForce limit. To be more exact, falls back to naive 2-Opts then. Additionally the WebTestUI can save and restore station sets (points).
    • The OverlayGraph has been rewritten and can handle pure Virtual Points and Edges now
  • SD-API
    • Still beta, but improved a lot. Under Android the german road network is routable within 10 seconds and less, using only 10 MegaByte RAM.
osm2po 4.9.1

Technical PreReleaseBeta for upcoming Version 5.0.x.

osm2po 4.8.8

It's time to say good bye to 4.7.7. (has been downloaded more than 2.500 times)
Here is the next step forward:

    • New RescueMode for orphaned ways in case the tileSize is too small
    • Again improved RAM-Usage in the segmenting phase. Most countries are now convertable with -Xmx1408m and tileSize=x,c (=without tiling)
    • An additional option to force the Segmenter to renumber vertex-IDs by QuadTile-Order.
    • OSM-Extracts (mostly small ones) without Relations are now convertable
    • Housekeeping and lots of re-packaging.
    • The TSP now provides a Default-Matrix-Creator/-Solver based on osm2po-routing.
    • Fixed InStreamAdapter class which allows osm2po to read gph-files from URLConnection and other InputStreams
    • Graph-Constructor can be called in asynchronous mode now.
    • SD stands for SmallDevice or SD-Card and is an entirely decoupled new branch targeting Android, packaged as one jar without any dependencies.
    • The Jar also contains an osm2po-postprocessor which creates the needed new graph format (*.gpt).
    • A good example of how to use it can be found here
osm2po 4.7.7

Another step forward. This time I've been concentrating on the osm2po routing again. Like always (sorry for that) some things had to be changed. But as long as you don't mix old with new data everything will work as usual.
Here are the upcoming main features:

  • Extensible Graph-File. Meaning, you can add custom data to the container in case you need a custom routing.
  • MlgBuilder (MLG = MultiLevelGrid)
    A new postprocessor, which utilizes the new extension mechanism to enrich the graph with few Highway-Levels.
    It bases on a geometric container concept which is not the fastest speed up technique but shows high preprocessing performance. I do not add shortcuts, so I can keep up my main goal to be fully compatible with the corresponding PostGIS/pgRouting tables and of course with the underlying OSM-Data. Another benefit is the insignificant memory overhead around 2% per use case.
  • A new MlgRouter (MultiLevelGridRouter)
    which is an at least five times faster DefaultRouter. On dense networks with more low level roads like service streets, pedestrian areas, etc. the performance even increases up to ten or higher.
    You might wonder now:
    Actually, it is not a BidiRouter, it's a simple forward router!
osm2po 4.6.9
Tech-Version with lots of improvements under the hood.

On the one hand this release is driven by many requests I received over the past months, on the other by some ideas I had myself. Due to the bulk of changes, most of the files osm2po creates are not compatible with older versions anymore.
So if you're going to upgrade to this version, you'll have to convert your existing extracts again.
Here are some key features:

  • Easier and shorter syntax for the street type definitions inside the configuration.
  • Improved memory usage, especially in the segmenting phase.
  • I added a merger module which lets you overlay different extracts, areas or even configurations between the joining and the segmenting phase.
  • The OverlayRouter has been replaced by DefaultRouter2 and an additional EdgeRouter2.
  • The RoutingResultSegment contains an already calculated and correct km and h in case the ratio does not equal 1.
  • The SOAP-wsdl has been modified as well. Now it acts more consistently with reference to the REST interface.
  • Osm2po's service now provides an i18n error messages bundle. Meaning, you'll receive reliable error numbers and messages from the SOAP- as well as from the REST interface.
  • I added some more map layers to the WebTestUI. So if one of them fails to load (mapnik is a notorious candidate for it) you can switch to another. I even added a hillshading layer, which gives you an impression of 2.5D.
osm2po 4.5.25
Feature Version with lots of improvements under the hood
  • Support for Openstreetmap's new o5m file format.
  • Experimental but working Overlay-Graph-Technique added. osm2po is now able to start and finish at random points, not only at links.
  • Due to the latter, the wsdl (SOAP) has changed.
  • The osm2po-converter for PostGIS/pgRouting has not been modified. However, found some minor bugs and fixed them.
osm2po 4.5.2
Feature-Version with lots of improvements under the hood
  • The PostGIS-SQL-Export (pgRoutingWriter) creates LINESTRINGs instead of MULTILINESTRINGs by default.
  • The TSP (which is still beta) is able to calculate routes with different source and target (no roundtrip)
osm2po 4.4.55
Tech-Version with lots of improvements under the hood
  • UI-ShortKeys for analyzing data.
    Ctrl-Shift-Click: shows closest vertex and outgoing edges, Ctrl-Alt-Click: shows closest Edge or, if closer, the closest vertex with its edges.
  • Direct UI-DownLoad-Link to OSM-Api which retrieves the raw xml data of the current view.
  • BugFix: turn restrictions not recognized if oneways are involved. Puhhhh - what a bug!!!
osm2po 4.4.4a
Patch Version for 4.4.4
  • Surprise, surprise ;-(
    Broken dependency on OpenStreetMap.js
    because TilesAtHome (Osmarender) doesn't exist anymore.
osm2po 4.4.4
Feature Version with lots of improvements under the hood
  • New: Multithreaded Routing!
    StressTest (System 3GHz/2GB -Xmx300m reserverd) :
    I emulated 100 Users requesting random routes on germany.osm in parallel.
    osm2po performed each request peacefully.
  • Bugfix: osm2po doesn't accept input sources like directly.
  • New: Routing as SOAP-Service. The link to the wsdl can be found in the Web-GUI.
  • Modified: Enriched set of attributes for the HTTP/GET-GeoJson- Response.
  • English OnScreen-Help.
    Start osm2po with either -h, help or --help.
osm2po 4.3.8
Feature Version with lots of improvements under the hood
  • The osm2po-routing has been modified and hence is not compatible with version 4.2.x anymore.
    Now, instead of writing lots of g*.2po-Files, the GraphBuilder creates one single File with a .gph extension. This file contains the entire graph including geometries and street-names.
  • Because of the new Graph-File, the routing itself uses different Java-Classes. So if you are using osm2po as Standalone-Router (as Java-Lib) look at the new Sample on the Tipps-Tab.
  • The osm2po-converter for PostGIS/pgRouting has not been changed. However, found some minor bugs and fixed them.
osm2po 4.2.30
Feature Version with lots of improvements under the hood
  • The osm2po-routing now contains a Driving-Distance, an AStar and an experimental Travelling-Salesman. Therefore I had to change some interfaces in the routing library. Hence, if you are running osm2po-routing as standalone, contact me for further infos.
    I also had to change the format of one generated routing file. So don't use older g*.2po files. To make it compatible, just convert it again with the cmd=g parameter.
  • The osm2po-converter for PostGIS/pgRouting has not been changed. However, found some minor bugs and fixed them.
  • I've changed some default settings in the osm2po.config file. Most important: I've renumbered the Class-IDs for Streets. So be careful, if things depend on these defaults.
  • An experimental but powerful feature is osm2po's new GeoJson support. Just start the osm2po-Service and directly visualize a route in QuantumGis.
osm2po 4.1.9
Feature Version with lots of improvements under the hood
  • First osm2po-Version which routes over the entire OSM-Planet-File.
osm2po 1.1.3
First official Version
entire planet as bz2 or pbf (search for planet-latest)
extracts as bz2 or pbf
sources listed in the OSM-Wiki
Help current on-screen help Conversion sample calls QuantumGIS requesting GeoJson Layer Java osm2po as library More on the Web

Responsible for the content of this website:

Carsten Moeller
Dingstaette 12
D-25421 Pinneberg


Despite careful control of the contents,
I do not assume any liability for the content of any sites linked to from this Web site.
I do not control sites linked to and assume no responsibility for their content.
Solely the operators of sites linked to are responsible for the content of said sites.

page last modified: 2014-10-20