How do osm2po and osm2pgrouting differ in their algorithms for creating their ways table ? I've seen significant differences between their processing of the same osm extract.

Processing the same file (us-midwest-latest.osm) from geofabrik using both osm2po and osm2pgrouting (and using config for cars only with both) resulted in nearly 400K more entries in the ways table from osm2pgrouting than in the corresponding *_2po_4pgr table.

Does osm2pgrouting just create more nodes/vertices?


After analyzing my dataset more with QGIS I think I've found most of the differences.

Using osm2pgrouting with mapconfig_for_cars.xml still includes vertices related to pedestrian interaction, whereas osm2po with wtr.finalMask = car does not.

Here is a view of OSM of an intersection with crosswalks... OSM Data with Crosswalks

Here is a view of my dataset (which is roads only) in QGIS of the same intersection... QGIS Data

The smaller blue vertices come from osm2pgrouting and they include the vertices for pedestrian crossings, whereas the larger green vertices, generated from osm2po, only contain street and rail crossings.

Likely, amending the configuration of level_crossing in the oms2po.config to include bike & foot would cause the disparity to drop significantly.

# very special hint for level_crossing modification

wtr.shuttleTrainMask = rail|car

Also, I have seen that the little used road type tertiary_link is in use in places as well, so I'll be adding that to my osm2po.config to get those segments to appear in my ways table.

  • Hmmmm... tertirary_link is no official tag, but I'm afraid, I've got to add it to the default config (next version). hmm.... shuttleTrainMask is a very delicate thing in osm2po. It's been introduced to distinguish links connecting road an rail, which in my opinion is a big OSM nuisance. osm2po uses this hint to decouple/disconnect them by assigning different vertex-ids but leaves them untouched if rail resolves to shuttleTrain. – Carsten Aug 9 '14 at 8:54
  • Yeah, it seems to be heavily in use, even though I can't quite wrap my head around what it's supposed to be. Processing the north american extract, there are 14961 segments in my 'ways' table that are categorized as tertiary_link – widesGIS Aug 11 '14 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.