I created and imported OpenStreetMap (OSM) data into Postgres using osm2po:

e.g. java -Xmx8g -jar osm2po-4.6.9/osm2po-core-4.6.9-signed.jar config=osm2po.config.eu_xc prefix=eu tileSize=x,c europe-latest.osm.bz2

and psql -d osm2po_eu_xc -q -f "eu_2po_4pgr.sql"

which creates the table eu_2po_4pgr and has datasets with columns "osm_source_id", "osm_target_id".

I created and imported the exact same osm data (using the exact same bz2 file) using osm2pgsql (0.69)

e.g. time osm2pgsql -smuc europe-latest.osm.bz2 -d osm_eu

which creates table like planet_osm_point which has a "column osm_id".

I can't find the "osm_source_id" in say planet_osm_point.

What I would like is to join the osm2po table with the original OSM Data, in order to have the complete information.

Is that possible or am I missing something fundamentally?

1 Answer 1


The osm_* attributes should match. If not, there is sth. wrong. How many rows does your planet_osm_point have? There should be around 600 Mio. If it's dramatically smaller I assume there's sth. wrong with your osm import.

  • They should match? Ok, thank you. I'm using the europe osm and select count(*) n from planet_osm_point; n -------- 24141269 so I need to look into the osm2pgsql import. Commented Aug 23, 2013 at 7:33
  • and this already gives a smaller numer than the osm table so that's a marker that I got the osm2pgsql import wrong: select count(*) n from (select distinct osm_source_id from eu_2po_4pgr) t; n ---------- 25728084 Commented Aug 23, 2013 at 7:35
  • the entire planet contains about 2 Gig Nodes. I remember one of my last tests on Europe where I got a number of around 600 Mio nodes. So there must be sth. wrong with your osm2pgsql import. But I'm sorry. I cannot help you at this point.
    – Carsten
    Commented Aug 23, 2013 at 17:00
  • Have you tried to search in planet_osm_line? Routes are lines not points.
    – Magno C
    Commented May 23, 2016 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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