This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Missing Timestamp in osm2pgsql import

0

I am importing data into PostgreSQL using osm2pgsql, and want to include the osm_timestamp data. I've updated my style file, and used the --extra-attributes and --hstore-all flags, which gives me timestamp data in my planet_osm_nodes and planet_osm_line` tables, but not in the polygon or points tables. How can I get the timestamp data to appear in those tables?

asked 30 Jul '18, 19:41

gsoyka-radiant's gravatar image

gsoyka-radiant
11112
accept rate: 0%

1

Which version of osm2ogsql are you using?

(31 Jul '18, 18:06) SimonPoole ♦

I'm running osm2pgsql SVN version 0.88.1

(31 Jul '18, 19:12) gsoyka-radiant

One Answer:

2

0.88.1 is something like 3 years old. I haven't checked specifically for that version, but older osm2pgsql version only supported importing timestamps from XML format data and not from PBF files. More recent version use a third party OSM data parsing library and should support timestamps from PBF.

Note: the 0.9* version have changes in the database schema and you will have to re-import.

answered 31 Jul '18, 23:27

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

edited 31 Jul '18, 23:28

Source code available on GitHub .