Routing on OpenStreetMap Data

not perfect but possible ...
New beta 4.4.55
osm2po recommends


Quantum GIS


OpenLayers


PostgreSQL


PostGIS


pgRouting

created with XMind

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.

Licence
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)
  • Adds some more writers.
  • Enables osm2po to read from bz2 and pbf
osm2po 4.4.55 beta Download 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 Download This is the patched Version 4.4.4
  • Fixed: Broken dependency on OpenStreetMap.js.
osm2po 4.4.4 Bundles osm2po-core.jar, osm2po-plugins.jar and the german documentation (PDF).
Some Release Notes:
  • 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 http://api.openstreetmap.org/api?map=... 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 Bundles osm2po-core.jar, osm2po-plugins.jar and the german documentation (PDF).
Some Release Notes:
  • 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 Bundles osm2po-core.jar, osm2po-plugins.jar and the german documentation (PDF).
Some Release Notes:
  • 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 Bundles osm2po-core.jar, osm2po-plugins.jar and the german documentation (PDF).
  • First osm2po-Version which routes over the entire OSM-Planet-File.
OpenStreetMap
entire planet as bz2 or pbf (search for planet-latest)
Geofabrik
extracts as bz2 or pbf
Cloudmade
extracts as bz2 or splitted bz2 (concat first)
Date Topic Description
2012-05-20 Version 4.4.55 beta released
2012-03-14 Version 4.4.4a released The osm2po-WebTestUI is not working since OSM modified the "OpenStreetMap.js".
The Osmarender-Layer (TilesAtHome) has been removed!
I had to react and uploaded this patched Version.
2012-03-09 Version 4.4.4 released
2012-02-15 English OnScreen-Help I'm going to integrate an onscreen help into osm2po's next version. The still under construction draft can be found in the Tipps-Tab on this page.
2012-02-04 Version 4.3.8 released osm2po-Routing is now based on one single Graph-File which includes the Topology, the geometries and names.
2012-02-04 Wow! Version 4.2.30 has been downloaded more than 500 times.
2011-11-21 Version 4.2.30 released I hate Internet Explorer!
Finally osm2po is compatible with IE < 9 again.
For the one person who already downloaded 4.2.29: Please excuse.
2011-11-20 New Version 4.2.29 released Preview
2011-09-20 OpenLayers 2.11 Problem solved Because this only affects the routing-demo and not the conversion part, I'm not going to release a new version for this fix. However, If you need it now, please contact me via email so I can send you my current version.
2011-09-17 OpenLayers-Bug There is a bug in the new OpenLayers-API which is automatically included in the osm2po-Demo. The Bug is described here.
I reported this behavior to the OpenLayers Forum.
I am not going to code a workaround.
I hope they will fix it soon.
2011-08-18 More Samples
  • I added some more samples to this page.
2011-08-15 4.1.9 released
  • Routes over the entire planet.
2011-08-04 4.1.6 released
  • Treats roundabouts as implicit oneways if not tagged otherwise.
  • Version 3.1 has been removed from the download page.
2011-07-23 4.1.0 released
  • Version is rewritten from scratch and not compatible with 3.x anymore.
2011-06-01 3.2.0 released
  • Reads from StdIn if no file name is given.
  • Plugin's PBF-Parser BugFix (crosby.binary) for files greater than 4 Gig (e.g. europe.osm.pbf)
About:

Here are some successful calls in order to convert OSM-Data to postGIS/pgRouting. These samples also start the osm2po-Service. If you are not interested in the latter, add the parameter cmd=c to each call. But this will not generate the native routing file (*2po.gph).

System RAM Data Source Command Ways Unresolved
32 Bit 1 Gig Hamburg 08/2011 Geofabrik java -jar osm2po-xxx.jar prefix=hh http://download.geofabrik.de/osm/europe/germany/hamburg.osm.pbf 29 K 0
32 Bit 1 Gig Germany 05/2011 Geofabrik java -Xmx640m -jar osm2po-core-4.jar prefix=de tileSize=10x10,0.5 germany.osm.pbf 2.6 M 0
32 Bit 2 Gig Germany 05/2011 Geofabrik java -Xmx1408m -jar osm2po-xxx.jar prefix=de tileSize=x,c http://download.geofabrik.de/osm/europe/germany.osm.pbf 2.6 M 0
32 Bit 2 Gig Europe 05/2011 Geofabrik java -Xmx1408m -jar osm2po-xxx.jar prefix=eu tileSize=10x10,1,c http://download.geofabrik.de/osm/europe.osm.pbf 11.6 M 23
64 Bit 4 Gig Europe 08/2011 Geofabrik java -Xmx3g -jar osm2po-xxx.jar prefix=eu tileSize=15x15,1,c europe.osm.pbf 12.6 M 3
64 Bit 8 Gig Europe 08/2011 Geofabrik java -Xmx6g -jar osm2po-xxx.jar prefix=eu tileSize=x,c europe.osm.pbf 12.6 M 0
64 Bit 8 Gig USA 08/2011 Cloudmade java -Xmx6g -jar osm2po-xxx.jar prefix=us tileSize=45x45,1,c united_states.osm.bz2 14.5 M 1528
(Cloudmade problem?)
64 Bit 8 Gig Planet 08/2011 OSM java -Xmx6g -jar osm2po-xxx.jar prefix=pl tileSize=45x45,1,c http://planet.openstreetmap.org/pbf-experimental/planet-latest.osm.pbf 35.5 M 7

Note:

(Number of) ways include
highway=primary, highway=primary_link, highway=secondary, highway=secondary_link, highway=tertiary, highway=motorway, highway=motorway_link, highway=trunk, highway=trunk_link, highway=residential, highway=road, highway=unclassified, highway=service, route=ferry, railway=rail (if shuttle_train)

Issue Description Tip or Code
osm2po help program's current on-screen help
QuantumGIS osm2po as GeoJson-Layer
Either as route or as a cloud of points which denotes the driving circle distance from a given source. These points can be used for Alpha-Shapes ;-)
Java Standalone Routing
Sample for Version 4.3.x and 4.4.x
Java Standalone Routing
Sample for Version 4.2.x

Responsible for the content of this website:

Carsten Moeller
Dingstaette 12
D-25421 Pinneberg
Germany

email

Disclaimer:
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: 2012-05-20